Package it.eng.spagobi.tools.dataset.bo

Examples of it.eng.spagobi.tools.dataset.bo.DataSetParameterItem


      //TODO da cambiare con il nuovo metodo
      List parametersToFill = new ArrayList();
      if (parametersToFill != null && parametersToFill.size() > 0) {
        Iterator it = parametersToFill.iterator();
        while (it.hasNext()) {
          DataSetParameterItem aDataSetParameterItem = (DataSetParameterItem) it.next();
          SDKDataSetParameter sdkParameter = findRelevantSDKDataSetParameter(aDataSetParameterItem, sdkDataSet);
          if (sdkParameter == null) {
            logger.error("SDKDataSetParameter for DataSetParameterItem with name [" + aDataSetParameterItem.getName() + "] not found!!");
            throw new MissingParameterValue(aDataSetParameterItem.getName());
          }
          String[] values = sdkParameter.getValues();
          logger.debug("Values set for parameter [" + aDataSetParameterItem.getName() + "] are: " + values);
          if (values == null || values.length == 0) {
            logger.error("SDKDataSetParameter contains no values for DataSetParameterItem with name [" + aDataSetParameterItem.getName() + "]!!");
            throw new MissingParameterValue(aDataSetParameterItem.getName());
          }
          checkParameterValues(values, aDataSetParameterItem);
          String parameterValues = getParameterValues(values, aDataSetParameterItem);
          logger.debug("Setting values [" + parameterValues + "] for parameter with name = [" + aDataSetParameterItem.getName() + "]");
          parameters.put(aDataSetParameterItem.getName(), parameterValues);
        }
      }
      dataSet.setParamsMap(parameters);
      dataSet.loadData();
      IDataStore dataStore = dataSet.getDataStore();
View Full Code Here


         Object parametersO=dataSet.getParameters();
         if(parametersO!=null){
           String parametersXML=parametersO.toString();
         DataSetParametersList dsList=new DataSetParametersList(parametersXML);
         for (Iterator iterator = dsList.getItems().iterator(); iterator.hasNext();) {
          DataSetParameterItem item = (DataSetParameterItem) iterator.next();
          String name=item.getName();
          // check if parameter is in request
          if(requestSB.getAttribute(name)!=null){
            String value=((Object)requestSB.getAttribute(name)).toString();
            parameters.put(name, value);
           
View Full Code Here

      if ( !StringUtilities.isEmpty(parametersXML) ) {
        parameters = DataSetParametersList.fromXML(parametersXML).getItems();
        logger.debug("Dataset have  [" + parameters.size() + "] parameters");

        for (int i = 0; i < parameters.size(); i++) {
          DataSetParameterItem dsDet = (DataSetParameterItem) parameters.get(i);
          String name = dsDet.getName();
          String type = dsDet.getType();
          logger.debug("Paremeter [" + (i+1) + "] name is equals to  [" + name + "]");
          logger.debug("Paremeter [" + (i+1) + "] type is equals to  [" + type + "]");
          parTypeMap.put(name, type);
        }
      } 
View Full Code Here

          output.append("    <input type='hidden' id='indexOfItemToDown' name='' value=''/>\n");
          output.append("    <input type='hidden' id='indexOfItemToUp' name='' value=''/>\n");
          boolean alternate = false;
              String rowClass;
          for (int i = 0; i < parameters.size(); i++) {
            DataSetParameterItem dsDet = (DataSetParameterItem) parameters.get(i);
            String name = dsDet.getName();
            String type = dsDet.getType();
           
            //before sending name and description to the hidden input,
            //substitute single and double quotes with their html encoding
            name = GeneralUtilities.substituteQuotesIntoString(name);
            type= GeneralUtilities.substituteQuotesIntoString(type);
View Full Code Here

    if(type.equals("1")){

      usedParameters=new HashMap();
      // if in query case I must do conversion of parameter value conforming to their type
      for (Iterator iterator = dsList.getItems().iterator(); iterator.hasNext();) {
        DataSetParameterItem item= (DataSetParameterItem) iterator.next();
        String name=item.getName();
        String typePar=item.getType();

        String value=(String)parameters.get(name);
        boolean singleValue=true;
        if(value==null){
          throw new Exception();
View Full Code Here

      logger.warn("DataSetParameterItem list in input is null!!");
      return null;
    }
    SDKDataSetParameter[] toReturn = new SDKDataSetParameter[dataSetParameterItemList.size()];
    for (int i = 0; i < dataSetParameterItemList.size(); i++) {
      DataSetParameterItem aDataSetParameterItem = (DataSetParameterItem) dataSetParameterItemList.get(i);
      SDKDataSetParameter aSDKDataSetParameter = this.fromDataSetParameterItemToSDKDataSetParameter(aDataSetParameterItem);
      toReturn[i] = aSDKDataSetParameter;
    }
    logger.debug("OUT");
    return toReturn;
View Full Code Here

    }
    String toReturn = null;
    List paramsList = new ArrayList<String>();
    for (int i = 0; i < dataSetParameterArray.length; i++) {
      SDKDataSetParameter aDataSetParameterItem = ((SDKDataSetParameter) dataSetParameterArray[i]);
      DataSetParameterItem aBIDataSetParameter = this.fromSDKDataSetParameterItemToBIDataSetParameter(aDataSetParameterItem);
      paramsList.add(aBIDataSetParameter);
    }
    toReturn = this.deserializeSKDatasetParametersArray(paramsList);

    logger.debug("OUT");
View Full Code Here

   
    if (SDKDataSetParameterItem == null) {
      logger.warn("SDKDataSetParameterItem in input is null!!");
      return null;
    }
    DataSetParameterItem toReturn = new DataSetParameterItem();
    toReturn.setName(SDKDataSetParameterItem.getName());
    toReturn.setType(SDKDataSetParameterItem.getType());
    logger.debug("OUT");
    return toReturn;
  }
View Full Code Here

    String toReturn = "";
    SourceBean sb = new SourceBean("PARAMETERSLIST")
    SourceBean sb1 = new SourceBean("ROWS");
   
    for(int i=0; i< parsArraySDK.size(); i++){
      DataSetParameterItem par = (DataSetParameterItem)parsArraySDK.get(i);
      String name = par.getName()
      String type = par.getType()
      SourceBean b = new SourceBean("ROW");
      b.setAttribute("NAME", name);
      b.setAttribute("TYPE", type);
      sb1.setAttribute(b)
   
View Full Code Here

          parametersToFill=dsParam.getItems();       
        }
        if (parametersToFill != null && parametersToFill.size() > 0) {
          Iterator it = parametersToFill.iterator();
          while (it.hasNext()) {
            DataSetParameterItem aDataSetParameterItem = (DataSetParameterItem) it.next();
            SDKDataSetParameter sdkParameter = findRelevantSDKDataSetParameter(aDataSetParameterItem, sdkDataSet);
            if (sdkParameter == null) {
              logger.error("SDKDataSetParameter for DataSetParameterItem with name [" + aDataSetParameterItem.getName() + "] not found!!");
              throw new MissingParameterValue(aDataSetParameterItem.getName());
            }
            String[] values = sdkParameter.getValues();
            logger.debug("Values set for parameter [" + aDataSetParameterItem.getName() + "] are: " + values);
            if (values == null || values.length == 0) {
              logger.error("SDKDataSetParameter contains no values for DataSetParameterItem with name [" + aDataSetParameterItem.getName() + "]!!");
              throw new MissingParameterValue(aDataSetParameterItem.getName());
            }
            checkParameterValues(values, aDataSetParameterItem);
            String parameterValues = getParameterValues(values, aDataSetParameterItem);
            logger.debug("Setting values [" + parameterValues + "] for parameter with name = [" + aDataSetParameterItem.getName() + "]");
            parameters.put(aDataSetParameterItem.getName(), parameterValues);
          }
        }
        dataSet.setParamsMap(parameters);
        dataSet.loadData();
        IDataStore dataStore = dataSet.getDataStore();
View Full Code Here

TOP

Related Classes of it.eng.spagobi.tools.dataset.bo.DataSetParameterItem

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.