Package it.eng.spagobi.utilities.engines

Examples of it.eng.spagobi.utilities.engines.EngineAnalysisMetadata


   
    String queryName = null;   
    String  queryDescritpion  = null;   
    String  queryScope  = null;
    String jsonEncodedQuery = null;
    EngineAnalysisMetadata analysisMetadata = null;
    String result = null;
   
    logger.debug("IN");
   
    try {
      super.service(request, response)
     
      // validate input that cames from the clien side according to rules spicified in validation.xml
      // todo: move this activity in the parent abstract class and hide input validation from actual
      // service implementation
      validateInput();
     
      queryName = getAttributeAsString(QUERY_NAME);   
      logger.debug(QUERY_NAME + ": " + queryName);
      queryDescritpion  = getAttributeAsString(QUERY_DESCRIPTION);
      logger.debug(QUERY_DESCRIPTION + ": " + queryDescritpion);
      queryScope  = getAttributeAsString(QUERY_SCOPE);
      logger.debug(QUERY_SCOPE + ": " + queryScope);
      jsonEncodedQuery  = getAttributeAsString(QUERY);
      logger.debug(QUERY + ": " + jsonEncodedQuery);
     
      Assert.assertNotNull(getEngineInstance(), "It's not possible to execute " + this.getActionName() + " service before having properly created an instance of EngineInstance class");
      Assert.assertTrue(!StringUtilities.isEmpty(queryName), "Input parameter [" + QUERY_NAME + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
      Assert.assertTrue(!StringUtilities.isEmpty(queryDescritpion), "Input parameter [" + QUERY_DESCRIPTION + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
      Assert.assertTrue(!StringUtilities.isEmpty(queryScope), "Input parameter [" + QUERY_SCOPE + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
      Assert.assertTrue(!StringUtilities.isEmpty(jsonEncodedQuery), "Input parameter [" + QUERY + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
     
      analysisMetadata = getEngineInstance().getAnalysisMetadata();
      analysisMetadata.setName( queryName );
      analysisMetadata.setDescription( queryDescritpion );
   
      if( EngineAnalysisMetadata.PUBLIC_SCOPE.equalsIgnoreCase( queryScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PUBLIC_SCOPE );
      } else if( EngineAnalysisMetadata.PRIVATE_SCOPE.equalsIgnoreCase( queryScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PRIVATE_SCOPE );
      } else {
        Assert.assertUnreachable("Value [" + queryScope + "] is not valid for the input parameter " + QUERY_SCOPE);
      }
     
      Query query = null;
View Full Code Here


  public void service(SourceBean request, SourceBean response) {
   
    String queryName = null;   
    String  queryDescritpion  = null;   
    String  queryScope  = null;
    EngineAnalysisMetadata analysisMetadata = null;
   
    logger.debug("IN");
   
    try {
      super.service(request, response)
     
      // validate input that cames from the clien side according to rules spicified in validation.xml
      // todo: move this activity in the parent abstract class and hide input validation from actual
      // service implementation
      validateInput();
     
      queryName = getAttributeAsString(QbeEngineStaticVariables.CATALOGUE_NAME);   
      logger.debug(QbeEngineStaticVariables.CATALOGUE_NAME + ": " + queryName);
      queryDescritpion  = getAttributeAsString(QbeEngineStaticVariables.CATALOGUE_DESCRIPTION);
      logger.debug(QbeEngineStaticVariables.CATALOGUE_DESCRIPTION + ": " + queryDescritpion);
      queryScope  = getAttributeAsString(QbeEngineStaticVariables.CATALOGUE_SCOPE);
      logger.debug(QbeEngineStaticVariables.CATALOGUE_SCOPE + ": " + queryScope);
     
//      JSONObject workSheetDefinitionJSON = getAttributeAsJSONObject( QbeEngineStaticVariables.WORKSHEET_DEFINITION_LOWER );
//      logger.debug("Parameter [" + workSheetDefinitionJSON + "] is equals to [" + workSheetDefinitionJSON.toString() + "]");
//     
//      WorkSheetDefinition workSheetDefinition = (WorkSheetDefinition)SerializationManager.deserialize(workSheetDefinitionJSON, "application/json", WorkSheetDefinition.class);
//      getEngineInstance().setWorkSheetDefinition(workSheetDefinition);
     
      analysisMetadata = getEngineInstance().getAnalysisMetadata();
      analysisMetadata.setName( queryName );
      analysisMetadata.setDescription( queryDescritpion );
   
      if( EngineAnalysisMetadata.PUBLIC_SCOPE.equalsIgnoreCase( queryScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PUBLIC_SCOPE );
      } else if( EngineAnalysisMetadata.PRIVATE_SCOPE.equalsIgnoreCase( queryScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PRIVATE_SCOPE );
      } else {
        Assert.assertUnreachable("Value [" + queryScope + "] is not valid for the input parameter " + QbeEngineStaticVariables.CATALOGUE_SCOPE);
      }
     
      String result = saveAnalysisState();
View Full Code Here

  /** Logger component. */
    public static transient Logger logger = Logger.getLogger(GetAnalysisMetaAction.class);
   
   
  public void service(SourceBean request, SourceBean response) {
    EngineAnalysisMetadata analysisMetadata = null;
    JSONObject meta;
    String rowMeta = "";
   
    logger.debug("IN");
   
    try {
      super.service(request, response)
         
      analysisMetadata = getEngineInstance().getAnalysisMetadata();
     
      meta = new JSONObject();
      meta.put("id", analysisMetadata.getId());
      meta.put("name", analysisMetadata.getName());
      meta.put("description", analysisMetadata.getDescription());       
      meta.put("scope", analysisMetadata.getScope());
           
     
      try {
        writeBackToClient( new JSONSuccess(meta) );
      } catch (IOException e) {
View Full Code Here

  public void service(SourceBean request, SourceBean response) {
    String analysisName = null;   
    String  analysisDescritpion  = null;   
    String  analysisScope  = null;
    EngineAnalysisMetadata analysisMetadata = null;
    String result = null;
   
    logger.debug("IN");
   
    try {
      super.service(request, response);   
     
      EMFErrorHandler errorHandler = getErrorHandler();
      if (!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
        Collection errors = errorHandler.getErrors();
        Iterator it = errors.iterator();
        while (it.hasNext()) {
          EMFAbstractError error = (EMFAbstractError) it.next();
          if (error.getSeverity().equals(EMFErrorSeverity.ERROR)) {
            throw new SpagoBIEngineServiceException(getActionName(), error.getMessage(), null);
          }
        }
      }
     
       
     
      analysisName = getAttributeAsString(ANALYSIS_NAME);   
      logger.debug(ANALYSIS_NAME + ": " + analysisName);
      analysisDescritpion  = getAttributeAsString(ANALYSIS_DESCRIPTION);
      logger.debug(ANALYSIS_DESCRIPTION + ": " + analysisDescritpion);
      analysisScope  = getAttributeAsString(ANALYSIS_SCOPE);
      logger.debug(ANALYSIS_SCOPE + ": " + analysisScope);
     
     
      Assert.assertNotNull(getEngineInstance(), "It's not possible to execute " + this.getActionName() + " service before having properly created an instance of EngineInstance class");
      Assert.assertTrue(!StringUtilities.isEmpty(analysisName), "Input parameter [" + ANALYSIS_NAME + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
      Assert.assertTrue(!StringUtilities.isEmpty(analysisDescritpion), "Input parameter [" + ANALYSIS_DESCRIPTION + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
      Assert.assertTrue(!StringUtilities.isEmpty(analysisScope), "Input parameter [" + ANALYSIS_SCOPE + "] cannot be null or empty in oder to execute " + this.getActionName() + " service");   
   
      analysisMetadata = getEngineInstance().getAnalysisMetadata();
      analysisMetadata.setName( analysisName );
      analysisMetadata.setDescription( analysisDescritpion );
   
      if( EngineAnalysisMetadata.PUBLIC_SCOPE.equalsIgnoreCase( analysisScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PUBLIC_SCOPE );
      } else if( EngineAnalysisMetadata.PRIVATE_SCOPE.equalsIgnoreCase( analysisScope ) ) {
        analysisMetadata.setScope( EngineAnalysisMetadata.PRIVATE_SCOPE );
      } else {
        Assert.assertUnreachable("Value [" + analysisScope + "] is not valid for the input parameter " + ANALYSIS_SCOPE);
      }
     
     
View Full Code Here

  /** Logger component. */
    public static transient Logger logger = Logger.getLogger(GetAnalysisMetaAction.class);
   
   
  public void service(SourceBean request, SourceBean response) {
    EngineAnalysisMetadata analysisMetadata = null;
    JSONObject meta;
    String rowMeta = "";
   
    logger.debug("IN");
   
    try {
      super.service(request, response)

      analysisMetadata = getEngineInstance().getAnalysisMetadata();
     
      meta = new JSONObject();
      meta.put("id", analysisMetadata.getId());
      meta.put("name", analysisMetadata.getName());
      meta.put("description", analysisMetadata.getDescription());       
      meta.put("scope", analysisMetadata.getScope());
           
     
      try {
        writeBackToClient( new JSONSuccess(meta) );
      } catch (IOException e) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.engines.EngineAnalysisMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.