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

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


    return toReturn;
  }
 
  public JSONArray serializeJSONArrayParsList(String parsList) throws JSONException, SourceBeanException{
    JSONArray toReturn = new JSONArray();
    DataSetParametersList params  = DataSetParametersList.fromXML(parsList);
    toReturn = ObjectUtils.toJSONArray(params.getItems());
    return toReturn;
  }
View Full Code Here


       IDataSet dataSet=DAOFactory.getDataSetDAO().loadActiveIDataSetByID(Integer.valueOf(dataName));
       if(dataSet!=null){ 
         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();
View Full Code Here

    return toReturn;
  }
 
  private JSONArray serializeJSONArrayParsList(String parsList) throws JSONException, SourceBeanException{
    JSONArray toReturn = new JSONArray();
    DataSetParametersList params  = DataSetParametersList.fromXML(parsList);
    toReturn = ObjectUtils.toJSONArray(params.getItems());
    return toReturn;
  }
View Full Code Here

   * the aim is returning a map (name,value) of the used parameters, where value is ready for substitution
   */
 
  private static HashMap resolveParameters(String type,String parametersXML, Map parameters)throws Exception{
    logger.debug("IN");
    DataSetParametersList dsList=new DataSetParametersList(parametersXML);

    HashMap usedParameters=null;
    // if in query case
    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);
View Full Code Here

      toReturn.setType(spagoBiDataSet.getType());
     
      List dataSetParameterItemList = null;
      String parametersXML=spagoBiDataSet.getParameters();
      if(parametersXML!=null && !((parametersXML.trim()).equals(""))){
        DataSetParametersList dsParam=new DataSetParametersList(parametersXML);
        dataSetParameterItemList=dsParam.getItems();
      }
      SDKDataSetParameter[] parameters = null;
      if (dataSetParameterItemList != null) {
        parameters = this.fromDataSetParameterItemListToSDKDataSetParameterArray(dataSetParameterItemList);
      } else {
View Full Code Here

        logger.warn("error in parsing, recover metadata executing again the dataset! ");
        Map parameters = new HashMap();
        List parametersToFill = null;
        String parametersXML=dataSet.toSpagoBiDataSet().getParameters();
        if(parametersXML!=null && !((parametersXML.trim()).equals(""))){
          DataSetParametersList dsParam=new DataSetParametersList(parametersXML);
          parametersToFill=dsParam.getItems();       
        }
        if (parametersToFill != null && parametersToFill.size() > 0) {
          Iterator it = parametersToFill.iterator();
          while (it.hasNext()) {
            DataSetParameterItem aDataSetParameterItem = (DataSetParameterItem) it.next();
View Full Code Here

TOP

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

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.