Package it.eng.spagobi.sdk.datasets.bo

Examples of it.eng.spagobi.sdk.datasets.bo.SDKDataSetParameter


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


  }

  private SDKDataSetParameter findRelevantSDKDataSetParameter(
      DataSetParameterItem dataSetParameterItem, SDKDataSet sdkDataSet) {
    logger.debug("IN");
    SDKDataSetParameter toReturn = null;
    try {
      String parameterName = dataSetParameterItem.getName();
      SDKDataSetParameter[] parameters = sdkDataSet.getParameters();
      if (parameters != null && parameters.length > 0) {
        for (int i = 0; i < parameters.length; i++) {
          SDKDataSetParameter aSDKDataSetParameter = parameters[i];
          if (aSDKDataSetParameter.getName().equals(parameterName)) {
            toReturn = aSDKDataSetParameter;
            break;
          }
        }
      }
View Full Code Here

      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

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

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

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

        return null;
      }
      if (params!=null && params.length>0){
        HashMap parametersFilled= new HashMap();
        for(int i=0; i< params.length; i++){
          SDKDataSetParameter par = params[i];
          parametersFilled.put(par.getName(),par.getValues()[0]);
          logger.debug("Add parameter: "+par.getName()+"/"+par.getValues()[0]);
        }       
        dataSet.setParamsMap(parametersFilled);
      }
      dataSet.loadData();
      //toReturn = dataSet.getDataStore().toXml();
View Full Code Here

  }

  private SDKDataSetParameter findRelevantSDKDataSetParameter(
      DataSetParameterItem dataSetParameterItem, SDKDataSet sdkDataSet) {
    logger.debug("IN");
    SDKDataSetParameter toReturn = null;
    try {
      String parameterName = dataSetParameterItem.getName();
      SDKDataSetParameter[] parameters = sdkDataSet.getParameters();
      if (parameters != null && parameters.length > 0) {
        for (int i = 0; i < parameters.length; i++) {
          SDKDataSetParameter aSDKDataSetParameter = parameters[i];
          if (aSDKDataSetParameter.getName().equals(parameterName)) {
            toReturn = aSDKDataSetParameter;
            break;
          }
        }
      }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.sdk.datasets.bo.SDKDataSetParameter

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.