Package it.eng.spagobi.engines.console

Examples of it.eng.spagobi.engines.console.ConsoleEngineInstance


  public void service(SourceBean serviceRequest, SourceBean serviceResponse)  {
    logger.debug("IN")
    Monitor monitor =MonitorFactory.start("SpagoBI_Console.ConsoleEngineStartAction.service");
    Locale locale;
    DataSetServiceProxy proxyDS = null;
    ConsoleEngineInstance consoleEngineInstance = null;
   
    try {
      setEngineName(ENGINE_NAME);
      super.service(serviceRequest, serviceResponse);
     
      logger.debug("User Id: " + getUserId());
      logger.debug("Audit Id: " + getAuditId());
      logger.debug("Document Id: " + getDocumentId());
      logger.debug("Template: " + getTemplateAsString());
           
      if(getAuditServiceProxy() != null) {
        logger.debug("Audit enabled: [TRUE]");
        getAuditServiceProxy().notifyServiceStartEvent();
      } else {
        logger.debug("Audit enabled: [FALSE]");
      }
     
      logger.debug("Creating engine instance ...");
     
      try {
        consoleEngineInstance = ConsoleEngine.createInstance( getTemplateAsJSONObject(), getEnv() );
      } catch(Throwable t) {
        SpagoBIEngineStartupException serviceException;
        String msg = "Impossible to create engine instance for document [" + getDocumentId() + "].";
        Throwable rootException = t;
        while(rootException.getCause() != null) {
          rootException = rootException.getCause();
        }
        String str = rootException.getMessage()!=null? rootException.getMessage(): rootException.getClass().getName();
        msg += "\nThe root cause of the error is: " + str;
        serviceException = new SpagoBIEngineStartupException(ENGINE_NAME, msg, t);
       
       
        throw serviceException;
      }
      logger.debug("Engine instance succesfully created");
     
      locale = (Locale)consoleEngineInstance.getEnv().get(EngineConstants.ENV_LOCALE);
     
      setAttributeInSession( ENGINE_INSTANCE, consoleEngineInstance);   
      setAttribute(ENGINE_INSTANCE, consoleEngineInstance);
     
      setAttribute(LANGUAGE, locale.getLanguage());
View Full Code Here


    logger.debug("IN");
    Monitor monitor =MonitorFactory.start("SpagoBI_Console.ExecuteButtonAction.service");
   
    try {
      super.service(request,response);
      ConsoleEngineInstance consoleEngineInstance = getConsoleEngineInstance();
   
      message = getAttributeAsString( MESSAGE );
      logger.debug("Parameter [" + MESSAGE + "] is equals to [" + message + "]");     
      Assert.assertTrue(!StringUtilities.isEmpty( message ), "Parameter [" + MESSAGE + "] cannot be null or empty");
     
View Full Code Here

    logger.debug("IN");
    Monitor monitor =MonitorFactory.start("SpagoBI_Console.GetErrorListAction.service")
   
    try {
      super.service(request,response);
      ConsoleEngineInstance consoleEngineInstance = getConsoleEngineInstance();
   
      dataSetLabel = getAttributeAsString( DATASET_LABEL );
      logger.debug("Parameter [" + DATASET_LABEL + "] is equals to [" + dataSetLabel + "]");     
      Assert.assertTrue(!StringUtilities.isEmpty( dataSetLabel ), "Parameter [" + DATASET_LABEL + "] cannot be null or empty");
     
      callback = getAttributeAsString( CALLBACK );
      logger.debug("Parameter [" + CALLBACK + "] is equals to [" + callback + "]");
     
      rowId = getAttributeAsString( ID );
      logger.debug("Parameter [" + ID + "] is equals to [" + rowId + "]");
      Assert.assertNotNull(rowId, "Input parameters [" + ID + "] cannot be null");
     
      dataSet = null;
      try {
        dataSet = getDataSet(dataSetLabel);
      } catch(Throwable t) {
        throw new SpagoBIServiceException("Impossible to find a dataset whose label is [" + dataSetLabel + "]", t);
      }
      Assert.assertNotNull(dataSet, "Impossible to find a dataset whose label is [" + dataSetLabel + "]");
        /*
      Map params = new HashMap();
      params.put("id", rowId);
      dataSet.setParamsMap(params);
      */
      Map params = consoleEngineInstance.getAnalyticalDrivers();
      params.put("id", rowId);
      dataSet.setParamsMap(params);
      dataSet.setUserProfileAttributes(UserProfileUtils.getProfileAttributes( (UserProfile) this.getEnv().get(EngineConstants.ENV_USER_PROFILE)));
      Monitor monitorLD =MonitorFactory.start("SpagoBI_Console.GetErrorListAction.service.LoadData")
     
View Full Code Here

    logger.debug("IN");
    Monitor monitor =MonitorFactory.start("SpagoBI_Console.GetConsoleDataAction.service")
   
    try {
      super.service(request,response);
      ConsoleEngineInstance consoleEngineInstance = getConsoleEngineInstance();
     
      dataSetLabel = getAttributeAsString( DATASET_LABEL );
      logger.debug("Parameter [" + DATASET_LABEL + "] is equals to [" + dataSetLabel + "]");     
      Assert.assertTrue(!StringUtilities.isEmpty( dataSetLabel ), "Parameter [" + DATASET_LABEL + "] cannot be null or empty");
     
      callback = getAttributeAsString( CALLBACK );
      logger.debug("Parameter [" + CALLBACK + "] is equals to [" + callback + "]");
     
      dataSet = null;
      try {
        dataSet = getDataSet(dataSetLabel);
      } catch(Throwable t) {
        throw new SpagoBIServiceException("Impossible to find a dataset whose label is [" + dataSetLabel + "]", t);
      }
      Assert.assertNotNull(dataSet, "Impossible to find a dataset whose label is [" + dataSetLabel + "]");
      Map params = consoleEngineInstance.getAnalyticalDrivers();
      dataSet.setParamsMap(params);
      dataSet.setUserProfileAttributes(UserProfileUtils.getProfileAttributes( (UserProfile) this.getEnv().get(EngineConstants.ENV_USER_PROFILE)));
      //dataSet.setParamsMap(getEnv());
      //gets the max number of rows for the table
      String strRowLimit = ConsoleEngineConfig.getInstance().getProperty("CONSOLE-TABLE-ROWS-LIMIT");
View Full Code Here

  }
 
  private IDataSet getDataSet(String label) {
    IDataSet dataSet;
    DataSetServiceProxy datasetProxy;
    ConsoleEngineInstance engineInstance;
   
    engineInstance = getConsoleEngineInstance();
    dataSet = engineInstance.getDataSet(label);
    if (dataSet == null || dataSet.hasDataStoreTransformer()) {
      logger.debug("Dataset with label " + label + " was not already loaded. Invoking DataSetService....");
      datasetProxy = engineInstance.getDataSetServiceProxy();
      dataSet = datasetProxy.getDataSetByLabel(label);
      engineInstance.setDataSet(label, dataSet);
    } else {
      logger.debug("Dataset with label " + label + " was already loaded. Returning it without calling DataSetService.");
    }
   
    return dataSet;
View Full Code Here

    logger.debug("IN");
    Monitor monitor =MonitorFactory.start("SpagoBI_Console.GetWarningListAction.service")
   
    try {
      super.service(request,response);
      ConsoleEngineInstance consoleEngineInstance = getConsoleEngineInstance();
   
      dataSetLabel = getAttributeAsString( DATASET_LABEL );
      logger.debug("Parameter [" + DATASET_LABEL + "] is equals to [" + dataSetLabel + "]");     
      Assert.assertTrue(!StringUtilities.isEmpty( dataSetLabel ), "Parameter [" + DATASET_LABEL + "] cannot be null or empty");
     
      callback = getAttributeAsString( CALLBACK );
      logger.debug("Parameter [" + CALLBACK + "] is equals to [" + callback + "]");
     
      rowId = getAttributeAsString( ID );
      logger.debug("Parameter [" + ID + "] is equals to [" + rowId + "]");
      Assert.assertNotNull(rowId, "Input parameters [" + ID + "] cannot be null");
     
      dataSet = null;
      try {
        dataSet = getDataSet(dataSetLabel);
      } catch(Throwable t) {
        throw new SpagoBIServiceException("Impossible to find a dataset whose label is [" + dataSetLabel + "]", t);
      }
      Assert.assertNotNull(dataSet, "Impossible to find a dataset whose label is [" + dataSetLabel + "]");
        /*
      Map params = new HashMap();
      params.put("id", rowId);
      dataSet.setParamsMap(params);
      */
      Map params = consoleEngineInstance.getAnalyticalDrivers();
      params.put("id", rowId);
      dataSet.setParamsMap(params);
      dataSet.setUserProfileAttributes(UserProfileUtils.getProfileAttributes( (UserProfile) this.getEnv().get(EngineConstants.ENV_USER_PROFILE)));
      Monitor monitorLD =MonitorFactory.start("SpagoBI_Console.GetWarningListAction.service.LoadData")
      dataSet.loadData();
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.console.ConsoleEngineInstance

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.