Examples of LovResultHandler


Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

       
        LovResultCacheManager executionCacheManager = new LovResultCacheManager();
        lovResult = executionCacheManager.getLovResult(profile, biObjectParameter, executionInstance, true);
       
        // get all the rows of the result
        LovResultHandler lovResultHandler = new LovResultHandler(lovResult);   
        rows = lovResultHandler.getRows();
      } catch (Exception e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to get parameter's values", e);
      }
     
      return rows;
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

            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);
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

  private List getValidationErrorsOnValuesByLovResult(String lovResult, BIObjectParameter biparam, ILovDetail lovProvDet) throws Exception {
    logger.debug("IN");
    List toReturn = new ArrayList();
    List parameterValuesDescription = new ArrayList();
    // get lov result handler
    LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
    List values = biparam.getParameterValues();
    if (values != null && values.size()>0) {
      for (int i = 0; i < values.size(); i++) {
        //String value = values.get(i).toString();
        String value = null;
        String val = values.get(i).toString();
        if(val.equalsIgnoreCase("%")){
          value = "%";
        } else {
          value = URLDecoder.decode(val, "UTF-8");
        }
        String description = null;
        if (!value.equals("") && !lovResultHandler.containsValue(value, lovProvDet
            .getValueColumnName())) {
          logger.error("Parameter '" + biparam.getLabel() + "' cannot assume value '" + value + "'" +
              " for user '" + ((UserProfile)this.userProfile).getUserId().toString()
              + "' with role '" + this.executionRole + "'.");
          List l = new ArrayList();
          l.add(biparam.getLabel());
          l.add(value);
          EMFUserError userError = new EMFUserError(EMFErrorSeverity.ERROR, 1077, l);
          toReturn.add(userError);
          description = "NOT ADMISSIBLE";
        } else {
          description = lovResultHandler.getValueDescription(value,
              lovProvDet.getValueColumnName(), lovProvDet.getDescriptionColumnName());
        }
        parameterValuesDescription.add(description);
      }
    }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

        // get from cache, if available
        LovResultCacheManager executionCacheManager = new LovResultCacheManager();
        lovResult = executionCacheManager.getLovResult(profile, biObjectParameter, executionInstance, true);
       
        // get all the rows of the result
        LovResultHandler lovResultHandler = new LovResultHandler(lovResult);   
        rows = lovResultHandler.getRows();
     
      } catch (Exception e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to get parameter's values", e);
      }
     
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

      // get value and description column
      String valueColumn = lovProvDet.getValueColumnName();
      String descriptionColumn = lovProvDet.getDescriptionColumnName();
      // get all the rows of the result and build the option of the
      // combobox
      LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
      List rows = lovResultHandler.getRows();
      Iterator it = rows.iterator();
      while (it.hasNext()) {
        SourceBean row = (SourceBean) it.next();
        String value = (String) row.getAttribute(valueColumn);
        String description = (String) row.getAttribute(descriptionColumn);
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

        logger.debug("Document parameter is manual input. An empty HashMap will be returned.");
      } else {
        String lovprov = paruse.getLovProvider();
        ILovDetail lovDetail = LovDetailFactory.getLovFromXML(lovprov);
        String lovResult = lovDetail.getLovResult(profile, null, null);
        LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
        List rows = lovResultHandler.getRows();
        Iterator it = rows.iterator();
        while (it.hasNext()) {
          SourceBean row = (SourceBean) it.next();
          String value = (String) row.getAttribute(lovDetail.getValueColumnName());
          String description = (String) row.getAttribute(lovDetail.getDescriptionColumnName());
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.