Examples of ExecutionInstance


Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

    errorHand = respCont.getErrorHandler();
    SessionContainer sessionCont = reqCont.getSessionContainer();
    contextManager = new CoreContextManager(new SpagoBISessionContainer(sessionCont),
        new LightNavigatorContextRetrieverStrategy(request));
    // get biobject from the session
    ExecutionInstance instance = contextManager.getExecutionInstance(ExecutionInstance.class.getName());
    BIObject obj = instance.getBIObject();
    // get the id of the lookup parameter
    String objParIdStr = (String) request.getAttribute("LOOKUP_PARAMETER_ID");
//    if(objParIdStr==null)
//      objParIdStr = (String)getSession(request).getAttribute("LOOKUP_PARAMETER_ID");
    Integer objParId = Integer.valueOf(objParIdStr);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

  // logger component
  private static Logger logger = Logger.getLogger(StartNewExecutionProcess.class);
 
 
  public void doService() {
    ExecutionInstance instance;
   
    Integer documentId;
    String documentLabel;
    String executionRole;
    String userProvidedParametersStr;
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

    executionId = executionId.replaceAll("-", "");
   
    if (executionFlowId == null) executionFlowId = executionId;
       
    // create new execution instance
    ExecutionInstance instance = null;
    try {
      instance = new ExecutionInstance(getUserProfile(), executionFlowId, execId, biobjectId, aRoleName, modality,
          displayToolbar.booleanValue(), displaySlider.booleanValue());
    } catch (Exception e) {
      logger.error(e);
    }
    return instance;
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

  private static Logger logger = Logger.getLogger(DeleteViewpointsAction.class);
 
 
  public void doService() {
   
    ExecutionInstance executionInstance;
    IEngUserProfile userProfile;
    Integer biobjectId;
   
    String viewpointIds;
    String[] ids;
   
    IViewpointDAO viewpointDAO;
    Viewpoint viewpoint;
   
    logger.debug("IN");
   
    try {
     
      viewpointIds = this.getAttributeAsString(VIEWPOINT_IDS);
     
      logger.debug("Parameter [" + VIEWPOINT_IDS + "] is equals to [" + viewpointIds + "]");     
      Assert.assertTrue(!StringUtilities.isEmpty(viewpointIds), "Viewpoint's ids cannot be null or empty");
     
      ids = viewpointIds.split(",");
     
      executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
      Assert.assertNotNull(executionInstance, "Execution instance cannot be null");
     
      userProfile = this.getUserProfile();
      Assert.assertNotNull(userProfile, "Impossible to retrive user profile");
     
      biobjectId = executionInstance.getBIObject().getId();
      Assert.assertNotNull(executionInstance, "Impossible to retrive analytical document id");
     
      logger.debug("User: [" + userProfile.getUserUniqueIdentifier() + "]");
      logger.debug("Document Id:  [" + biobjectId + "]");
     
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

 
  public void doService() {
    logger.debug("IN");
    try {
      // retrieving execution instance from session, no need to check if user is able to execute the current document
      ExecutionInstance executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
      BIObject obj = executionInstance.getBIObject();
      BIObjectNotesManager objectNManager = new BIObjectNotesManager();
      String execIdentifier = objectNManager.getExecutionIdentifier(obj);
      String message = this.getAttributeAsString(MESSAGE);
      logger.debug("Parameter [" + MESSAGE + "] is equal to [" + message + "]");
     
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

    catch (Exception e) {
      logger.error("could not retrieve profile",e);
      throw new NonExecutableDocumentException();
    }

    ExecutionInstance instance =null;
    try{
      instance = new ExecutionInstance(profile, "111", "111", idDocument, roleName, SpagoBIConstants.SDK_EXECUTION_SERVICE, false, false);
    }
    catch (Exception e) {
      logger.error("error while creating instance",e);
      throw new NonExecutableDocumentException();
    }
    // put the parameters value in SDKPArameters into BiObject
    instance.refreshBIObjectWithSDKParameters(parameters);

    //    check if there were errors referring to parameters

    List errors=null;
    try{
      errors=instance.getParametersErrors();
    }
    catch (Exception e) {
      logger.error("error while retrieving parameters errors",e);
      throw new NonExecutableDocumentException();
    }
    if(errors!=null && errors.size()>0){
      for (Iterator iterator = errors.iterator(); iterator.hasNext();) {
        Object error = (Object) iterator.next();
        if(error instanceof EMFUserError){
          EMFUserError emfUser=(EMFUserError)error;
          String message="Error on parameter values ";
          if(emfUser.getMessage()!=null) message+=" "+emfUser.getMessage();
          if(emfUser.getAdditionalInfo()!=null) message+=" "+emfUser.getAdditionalInfo();
          logger.error(message);
          throw new MissingParameterValue();
        }
        else if(error instanceof EMFValidationError){
          EMFValidationError emfValidation=(EMFValidationError)error;
          String message="Error while checking parameters: ";
          if(emfValidation.getMessage()!=null) message+=" "+emfValidation.getMessage();
          if(emfValidation.getAdditionalInfo()!=null) message+=" "+emfValidation.getAdditionalInfo();
          logger.error(message);
          throw new InvalidParameterValue();

        }


      }
    }


    logger.debug("Check the document type and call the exporter (if present)");
    try {

      if ( document.getType().equalsIgnoreCase("KPI")) {  // CASE KPI
        toReturn = executeKpi(document, instance.getBIObject(), (String)profile.getUserUniqueIdentifier(), output);
      } else if (document.getType().equalsIgnoreCase("REPORT") || document.getType().equalsIgnoreCase("ACCESSIBLE_HTML")){  // CASE REPORT OR ACCESSIBLE_HTML
        toReturn = executeReport(document, instance.getBIObject(), profile, output);         
      } else {
        logger.error("NO EXPORTER AVAILABLE");
      }

    } catch(Exception e) {
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

        new LightNavigatorContextRetrieverStrategy(request));

    String currTheme=ThemesManager.getCurrentTheme(requestContainer);
    if(currTheme==null)currTheme=ThemesManager.getDefaultTheme();
   
    ExecutionInstance instance = null;
    try {
      instance = getExecutionInstance();
    } catch (Exception e) {
      logger.error("Error while retrieving execution instance", e);
      return SKIP_BODY;
    }
    BIObject obj = instance.getBIObject();
    roleName = instance.getExecutionRole();

    List parameters = obj.getBiObjectParameters();
    boolean hasParametersToBeShown = false;
    StringBuffer htmlStream = new StringBuffer();
    if (parameters != null && parameters.size() > 0) {
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

   * @return true if the parameters form must be displayed, false otherwise
   */
  private boolean hasParametersFormToBeDisplayed() {
    logger.debug("IN");
    try {
      ExecutionInstance instance = getExecutionInstance();
      BIObject obj = instance.getBIObject();
      List parameters = obj.getBiObjectParameters();
      // if the document has no parameters returns false
      if (parameters == null || parameters.size() == 0) return false;

      Iterator iter = parameters.iterator();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

  private void createClearFieldsJSFunction(StringBuffer htmlStream) {
    logger.debug("IN");
    htmlStream.append("<script type='text/javascript'>\n");
    htmlStream.append("    function clearFields" + requestIdentity + "() {\n");

    ExecutionInstance instance = getExecutionInstance();
    BIObject obj = instance.getBIObject();
    Iterator it = obj.getBiObjectParameters().iterator();
    String anId = null;
    while (it.hasNext()) {
      BIObjectParameter biparam = (BIObjectParameter) it.next();
      if (isSingleValue(biparam))
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.handlers.ExecutionInstance

   * @param biparam The dependent (if it is the case) parameter
   * @return the list of BIObjectParameter the input parameter depends on.
   */
  private List getDependencies(BIObjectParameter biparam) {
    List toReturn = new ArrayList();
    ExecutionInstance instance = getExecutionInstance();
    BIObject obj = instance.getBIObject();
    BIObjectParameter objParFather = null;
    ObjParuse objParuse = null;
    try {
      IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
      IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.