Package it.eng.spagobi.behaviouralmodel.analyticaldriver.bo

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.bo.BIObjectParameter


    } catch (EMFUserError e1) {
      logger.error("EMFUser Error",e1);
      e1.printStackTrace();
    }
   
    BIObjectParameter biobjpar = null;
    String parUrlName = null;
    String identif = null;
    List biobjpars = null;
    Iterator iterBiobjPars = null;
   
    if(biobj!=null){
      identif = "biobject=" + biobj.getLabel() + "&";
      biobjpars = biobj.getBiObjectParameters();
      iterBiobjPars = biobjpars.iterator();
      while(iterBiobjPars.hasNext()){
        biobjpar = (BIObjectParameter)iterBiobjPars.next();
        Parameter par = biobjpar.getParameter();
        if((par==null) || (!par.isFunctional())){
          continue;
        }
        parUrlName = biobjpar.getParameterUrlName();
        String parValue = (String)execUrlParMapWithValues.get(parUrlName);
         identif = identif + parUrlName + "=" + parValue;
         if(iterBiobjPars.hasNext()){
           identif = identif + "&";
         }
View Full Code Here


   * @return the looked up parameter
   * @throws Exception
   */
  public BIObjectParameter getLookedUpParameter(SourceBean request) throws Exception {
    logger.debug("IN");
    BIObjectParameter lookedupBIParameter = null;

    Integer objParId = getLookedUpParameterId(request);
    BIObject obj = getExecutionInstance().getBIObject();
    Iterator iterParams = obj.getBiObjectParameters().iterator();
    while (iterParams.hasNext()) {
      BIObjectParameter aBIParameter = (BIObjectParameter) iterParams
      .next();
      if (aBIParameter.getId().equals(objParId)) {
        lookedupBIParameter = aBIParameter;
        break;
      }
    }
    logger.debug("OUT");
View Full Code Here

   * @return String of the biobject execution identifier
   */
  public String getExecutionIdentifier(BIObject biobj ) {
    logger.debug("start method execution for biobject label " + biobj.getLabel());
    List biparvalues = null;
    BIObjectParameter biobjpar = null;
    String parUrlName = null;
    Iterator iterBiparValues = null;
    String identif = null;
    List biobjpars = null;
    Iterator iterBiobjPars = null;
    String parValueString = null;
   
    identif = "biobject=" + biobj.getLabel() + "&";
    biobjpars = biobj.getBiObjectParameters();
    iterBiobjPars = biobjpars.iterator();
    while(iterBiobjPars.hasNext()){
      biobjpar = (BIObjectParameter)iterBiobjPars.next();
      Parameter par = biobjpar.getParameter();
     
      if((par==null) || (!par.isFunctional())){
        continue;
      }
      parUrlName = biobjpar.getParameterUrlName();
       biparvalues = biobjpar.getParameterValues();
       if (biparvalues == null)
         continue;
       iterBiparValues = biparvalues.iterator();
       parValueString = "";
       while(iterBiparValues.hasNext()){
View Full Code Here

    //String roleName=(String)request.getAttribute("roleName");
    String roleName=instance.getExecutionRole();

    Integer objParId=Integer.valueOf(objParIdS);

    BIObjectParameter currbiObjPar=null;
    List biObjPars=instance.getBIObject().getBiObjectParameters();

    //currbiObjPar.set

    boolean found=false;
    for (Iterator iterator = biObjPars.iterator(); iterator.hasNext() && found==false;) {
      BIObjectParameter bipar = (BIObjectParameter) iterator.next();
      if(bipar.getId().equals(objParId)){
        currbiObjPar=bipar; 
        found=true;
      }
    }
View Full Code Here

    if (pendingDelete != null && !pendingDelete.trim().equals("")) {
      BIObject object = instance.getBIObject();
      List biparams = object.getBiObjectParameters();
      Iterator iterParams = biparams.iterator();
      while (iterParams.hasNext()) {
        BIObjectParameter biparam = (BIObjectParameter) iterParams.next();
        if (paramsDescriptionMap.get(biparam.getParameterUrlName()) != null)
          paramsDescriptionMap.put(biparam.getParameterUrlName(), "");
      }
      response.setAttribute(SpagoBIConstants.PUBLISHER_NAME, "ExecuteBIObjectPageParameter");
      return;
    }

    // it is a lookup call
    Object lookupObjParId = request.getAttribute("LOOKUP_OBJ_PAR_ID");
    if (isLookupCall(request)) {

      BIObjectParameter lookupBIParameter = getLookedUpParameter(request);

      if (lookupBIParameter == null) {
        logger.error("The BIParameter with id = "
            + getLookedUpParameterId(request).toString()
            + " does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1041);
      }
      ModalitiesValue modVal = lookupBIParameter.getParameter()
      .getModalityValue();

      String lookupType = (String) request.getAttribute("LOOKUP_TYPE");
      if (lookupType == null)
        lookupType = "LIST";

      if (lookupType.equalsIgnoreCase("CHECK_LIST")) {
        response.setAttribute("CHECKLIST", "true");
        response.setAttribute(SpagoBIConstants.PUBLISHER_NAME,
        "ChecklistLookupPublisher");
      } else if (lookupType.equalsIgnoreCase("LIST")) {
        response.setAttribute("LIST", "true");
        response.setAttribute(SpagoBIConstants.PUBLISHER_NAME,
        "LookupPublisher");
      } else {
        response.setAttribute("LIST", "true");
        response.setAttribute(SpagoBIConstants.PUBLISHER_NAME,
        "LookupPublisher");
      }

      response.setAttribute("mod_val_id", modVal.getId().toString());
      response.setAttribute("LOOKUP_PARAMETER_NAME", lookupBIParameter
          .getParameterUrlName());
      response.setAttribute("LOOKUP_PARAMETER_ID", lookupBIParameter
          .getId().toString());
      String correlatedParuseId = (String) request
      .getAttribute("correlatedParuseIdForObjParWithId_"
          + lookupObjParId);
      if (correlatedParuseId != null && !correlatedParuseId.equals(""))
View Full Code Here

    // gets parameter's values and creates a string of values
    List parameters = obj.getBiObjectParameters();
    Iterator iterParams = parameters.iterator();
    String contentVP = "";
    while (iterParams.hasNext()) {
      BIObjectParameter biparam = (BIObjectParameter) iterParams.next();
      String value = biparam.getParameterValuesAsString();
      if (value == null) value = "";
      String labelUrl = biparam.getParameterUrlName();
      // defines the string of parameters to save into db
      contentVP = contentVP + labelUrl + "%3D" + value + "%26";
    }
    if (contentVP != null && contentVP.endsWith("%26")) {
      contentVP = contentVP.substring(0, contentVP.length() - 3);
View Full Code Here

        if(biParameters.size() == 0)return true;
       
        int countHidePar = 0;
        Iterator iterPars = biParameters.iterator();
   
        BIObjectParameter biParameter = null;
//        ModalitiesValue paruse= null;
//        String typeparuse = null;
//        String lovprov = null;
//        ScriptDetail scriptDet = null;
       
        while (iterPars.hasNext()){
      biParameter = (BIObjectParameter)iterPars.next();
            Parameter par = biParameter.getParameter();
           
          if(biParameter.isTransientParmeters()) {
            countHidePar ++;
              continue;
          }
         
          if(biParameter.hasValidValues()) {
            countHidePar ++;
              continue;
          }
         
          if (par == null) {
        SpagoBITracer.major(ObjectsTreeConstants.NAME_MODULE,
             "ExecuteBIObjectMOdule",
             "directExecution",
             "The biparameter with label = ['" + biParameter.getLabel() + "'] and url name = ['" + biParameter.getParameterUrlName() + "'] has no parameter associated. ");
            continue;
          }

          /*
           * This part checks if the LOV is single value; this is not necessary because
View Full Code Here

  private void initBIParameters() {
    logger.debug("IN");
    Monitor monitor =MonitorFactory.start("spagobi.ExecutionInstance.initBIParameters");
    List tmpBIObjectParameters = object.getBiObjectParameters();
    Iterator it = tmpBIObjectParameters.iterator();
    BIObjectParameter aBIObjectParameter = null;
    while (it.hasNext()){
      aBIObjectParameter = (BIObjectParameter) it.next();
      logger.debug("Parameter Label:"+aBIObjectParameter.getLabel());
      // check if the script return an unique value and preload it
      Parameter par = aBIObjectParameter.getParameter();
      if(par != null) {
        ModalitiesValue paruse = par.getModalityValue();
        if (!paruse.getITypeCd().equals("MAN_IN") && paruse.getSelectionType().equals("COMBOBOX")) {  // load values only if not a lookup           
          try {
            String lovProv = paruse.getLovProvider();
            ILovDetail lovProvDet = LovDetailFactory.getLovFromXML(lovProv);
            LovResultCacheManager executionCacheManager = new LovResultCacheManager();
            String lovResult = executionCacheManager.getLovResult(this.userProfile, aBIObjectParameter, this, true);

            LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
            // if the lov is single value and the parameter value is not set, the parameter value
            // is the lov result
            if(lovResultHandler.isSingleValue() && aBIObjectParameter.getParameterValues() == null) {
              aBIObjectParameter.setParameterValues(lovResultHandler.getValues(lovProvDet.getValueColumnName()));
              aBIObjectParameter.setHasValidValues(true);
              aBIObjectParameter.setTransientParmeters(true);
            }
          } catch (Exception e) {
            logger.error(e);
            continue;
          }
View Full Code Here

      logger.debug("BIParameters list is empty.");
      return true;
    }
    int countHidePar = 0;
    Iterator iterPars = biParameters.iterator();
    BIObjectParameter biParameter = null;
    while (iterPars.hasNext()){
      biParameter = (BIObjectParameter)iterPars.next();
      Parameter par = biParameter.getParameter();
      if (biParameter.isTransientParmeters()) {
        countHidePar ++;
        continue;
      }
      if (biParameter.hasValidValues()) {
        countHidePar ++;
        continue;
      }
      if (par == null) {
        logger.error("The biparameter with label = ['" + biParameter.getLabel() + "'] and url name = ['" + biParameter.getParameterUrlName() + "'] has no parameter associated. ");
        continue;
      }
      /*
       * The following lines were commented because there should be not need to check if
       * the parameter is single-value, since if it is single-value then it is transient (see initBIParameters method)
View Full Code Here

          "[parameter url name=parameter value] by '=' characters.");
          continue;
        }
        String parUrlName = chunks[0];
        if (parUrlName == null || parUrlName.trim().equals("")) continue;
        BIObjectParameter biparameter = null;
        Iterator it = biparameters.iterator();
        while (it.hasNext()) {
          BIObjectParameter temp = (BIObjectParameter) it.next();
          if (temp.getParameterUrlName().equals(parUrlName)) {
            biparameter = temp;
            break;
          }
        }
        if (biparameter == null) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.behaviouralmodel.analyticaldriver.bo.BIObjectParameter

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.