class DescribeQueryServiceCommand extends GfshCommand {

  void addMethodAuthorizerToResultModel(QueryConfigService queryConfigurationService,
      ResultModel result) {
    QueryConfigService.MethodAuthorizer methodAuthorizer =
        queryConfigurationService.getMethodAuthorizer();

    DataResultModel dataResultModel = result.addData(QUERY_SERVICE_DATA_SECTION);

    if (methodAuthorizer != null) {
      if (isSecurityEnabled()) {
        dataResultModel
            .addData(AUTHORIZER_CLASS_NAME, methodAuthorizer.getClassName());
      } else {
        dataResultModel
            .addData(AUTHORIZER_CLASS_NAME, ALL_METHODS_ALLOWED);
      }
    }
  }

}