Examples of ExecutionInstance


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();
      UserProfile userProfile = (UserProfile) this.getUserProfile();
      ISnapshotDAO dao = null;
      try {
        dao = DAOFactory.getSnapshotDAO();
      } catch (EMFUserError e) {
View Full Code Here

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

      String executionId = (String) request.getAttribute("EXECUTION_ID");
      ExecutionManager executionManager = (ExecutionManager) contextManager.get(ExecutionManager.class.getName());
      if (executionManager == null) {
        throw new Exception("Execution Manager not found. Cannot recover execution details.");
      }
      ExecutionInstance instance = executionManager.recoverExecution(executionFlowId, executionId);
      // set execution instance in session
      setExecutionInstance(instance);
      // sets the flag in order to skip snapshots/viewpoints/parameters/subobjects page
      request.setAttribute(SpagoBIConstants.IGNORE_SUBOBJECTS_VIEWPOINTS_SNAPSHOTS, "true");
      // starts new execution
View Full Code Here

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

  private static Logger logger = Logger.getLogger(GetParameterValuesForExecutionAction.class);
 
 
  public void doService() {
   
    ExecutionInstance executionInstance;
   
    Assert.assertNotNull(getContext(), "Execution context cannot be null" );
    Assert.assertNotNull(getContext().getExecutionInstance( ExecutionInstance.class.getName() ), "Execution instance cannot be null");
 
    executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
   
    BIObject obj = executionInstance.getBIObject();
    String roleName = executionInstance.getExecutionRole();

    List parametersForExecution = new ArrayList();
    List parameters = obj.getBiObjectParameters();
   
    if (parameters != null && parameters.size() > 0) {
View Full Code Here

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

  private void executeCrossNavigationHandler(SourceBean request, SourceBean response)
  throws Exception {
    logger.debug("IN");
    try {
      ExecutionInstance instance = getExecutionInstance();
      // registers the current execution in the ExecutionManager
      ExecutionManager executionManager = (ExecutionManager) contextManager.get(ExecutionManager.class.getName());
      if (executionManager == null) {
        executionManager = new ExecutionManager();
        contextManager.set(ExecutionManager.class.getName(), executionManager);
View Full Code Here

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

        }
      }
    }

    // instantiates a new Execution controller for the current execution
    ExecutionInstance instance = createExecutionInstance(id, role, profile, request, modality);
    // put execution instance in session
    contextManager.set(ExecutionInstance.class.getName(), instance);
    instance.refreshParametersValues(request, true);
    instance.setParameterValues(userProvidedParametersStr, true);
    // refresh obj variable because createExecutionInstance load the BIObject in a different way
    obj = instance.getBIObject();

    // if a snapshot is required, executes it
    if (snapshot != null) {
      executeSnapshot(snapshot, response);
      return;
    }

    // TODO cancellare quando anche la check list � nella finestra di lookup
    Map paramsDescriptionMap = new HashMap();
    List biparams = obj.getBiObjectParameters();
    Iterator iterParams = biparams.iterator();
    while (iterParams.hasNext()) {
      BIObjectParameter biparam = (BIObjectParameter) iterParams.next();
      String nameUrl = biparam.getParameterUrlName();
      paramsDescriptionMap.put(nameUrl, "");
    }
    contextManager.set("PARAMS_DESCRIPTION_MAP", paramsDescriptionMap);

    // finds if it is requested to ignore subobjects/snapshots/viewpoints if present
    String ignoreSubNodesStr = (String) request.getAttribute(SpagoBIConstants.IGNORE_SUBOBJECTS_VIEWPOINTS_SNAPSHOTS);
    boolean ignoreSubNodes = false;
    if (ignoreSubNodesStr != null && ignoreSubNodesStr.trim().equalsIgnoreCase("true")) {
      ignoreSubNodes = true;
    }
   
    // finds if it is not important that all parameters have a value
    String runAnyway = (String) request.getAttribute(SpagoBIConstants.RUN_ANYWAY);
    boolean runAnywayB = false;
    if (runAnyway != null && runAnyway.trim().equalsIgnoreCase("true")) {
      runAnywayB = true;
    }

    // check parameters values
    List errors = instance.getParametersErrors();

    // (if the object can be directly executed (because it hasn't any parameter to be
    // filled by the user) and if the object has no subobject / snapshots / viewpoints saved
    // or the request esplicitely asks to ignore subnodes) or (a valid subobject
    // is specified by request) then execute it directly without pass through parameters page
    if (((instance.isDirectExecution()||runAnywayB) && ((subObjects.size() == 0
        && snapshots.size() == 0 && viewpoints.size() == 0) || ignoreSubNodes))
        || subObj != null) {

      logger.debug("Document can be directly executed");
      // add errors into error handler if any
View Full Code Here

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

    String displaySliderStr = (String) request.getAttribute(SpagoBIConstants.SLIDERS_VISIBLE);
    logger.debug("Display sliders request parameter: " + displaySliderStr);
    if (displaySliderStr == null || displaySliderStr.trim().equals("")) displaySliderStr = "true";
    boolean displaySlider = Boolean.parseBoolean(displaySliderStr);
    // create new execution instance
    ExecutionInstance instance = null;
    try {
      instance = new ExecutionInstance(profile, executionFlowId, executionId, biobjectId, aRoleName, modality, displayToolbar, displaySlider);
    } catch (Exception e) {
      logger.error(e);
    }
    return instance;
  }
View Full Code Here

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

   * @return the required subobject
   * @throws Exception
   */
  private SubObject getRequiredSubObject(SourceBean request) throws Exception {
    logger.debug("IN");
    ExecutionInstance instance = getExecutionInstance();
    BIObject obj = instance.getBIObject();
    List subObjects = getSubObjectsList(obj, getUserProfile());
    logger.debug("OUT");
    return getRequiredSubObject(request, subObjects);
  }
View Full Code Here

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

   * @param request The service request
   * @return the required snapshot
   */
  private Snapshot getRequiredSnapshot(SourceBean request) throws Exception {
    logger.debug("IN");
    ExecutionInstance instance = getExecutionInstance();
    BIObject obj = instance.getBIObject();
    List snapshots = getSnapshotList(obj);
    logger.debug("OUT");
    return getRequiredSnapshot(request, snapshots);
  }
View Full Code Here

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

   *            The response SourceBean
   */
  private void lookUpReturnHandler(SourceBean request, SourceBean response)
  throws Exception {
    logger.debug("IN");
    ExecutionInstance instance = getExecutionInstance();
    // get the object from the session
    BIObject obj = instance.getBIObject();
    // get the parameter name and value from the request
    String parameterNameFromLookUp = (String) request
    .getAttribute("LOOKUP_PARAMETER_NAME");
    if (parameterNameFromLookUp == null)
      parameterNameFromLookUp = contextManager.getString("LOOKUP_PARAMETER_NAME");
View Full Code Here

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

  private void executionSubObjectHandler(SourceBean request,
      SourceBean response) throws Exception {
    logger.debug("IN");
    SubObject subObj = getRequiredSubObject(request);
    // get object from session
    ExecutionInstance instance = getExecutionInstance();
    instance.eraseParametersValues();
    // execution
    execute(instance, subObj, null, response);
    logger.debug("OUT");
  }
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.