Package org.jboss.bpm.report.model

Examples of org.jboss.bpm.report.model.ReportReference


  }

  private void selectForm(String reportTitle)
  {
    inputPanel.clear();
    ReportReference current = getCurrentSelection();
    description.setText(current.getDescription());
    inputPanel.add(forms.get(reportTitle));
    ReportLaunchPadView.this.layout();
  }
View Full Code Here


      JSOModel reportCfg = rootModel.get(i);
      String title = reportCfg.get("title");
      String description = reportCfg.get("description", "");
      String reportFile = reportCfg.get("reportFileName");

      ReportReference reportRef = new ReportReference(reportFile);
      reportRef.setTitle(title);
      reportRef.setDescription(description);

      // parameter
      JsArray<JSOModel> params = reportCfg.getArray("parameterMetaData");
      for (int x=0; x < params.length(); x++)
      {
        JSOModel p = params.get(x);
        String name = p.get("name");
        String type = p.get("type");
        String dataType = p.get("dataType");

        ReportParameter pmd = new ReportParameter(name, ReportParameter.Type.valueOf(type));
        pmd.setDataType(ReportParameter.DataType.valueOf(dataType));

        // optional values
        pmd.setHelptext(p.get("helptext", ""));
        pmd.setPromptText(p.get("promptText", ""));

        reportRef.getParameterMetaData().add(pmd);
      }

      results.add(reportRef);
    }
    return results;
View Full Code Here

        }
    );

    for(File f : reportFiles)
    {
      reports.put(f.getName(), new ReportReference(f.getName()));
    }
  }
View Full Code Here

      IReportRunnable template = openCached(templateName);

      // Update report reference details
      String title = nonNull((String)template.getProperty(IReportRunnable.TITLE), "No title");
      String description = nonNull((String)template.getProperty(IReportRunnable.DESCRIPTION), "No description");
      ReportReference reportRef = reports.get(templateName);
      reportRef.setTitle(title);
      reportRef.setDescription(description);

      Map<String, Map<String,Serializable>> paramDetails =
          new HashMap<String, Map<String, Serializable>>();

      //Create Parameter Definition Task and retrieve parameter definitions
      IGetParameterDefinitionTask task = engine.createGetParameterDefinitionTask( template );
      Collection params = task.getParameterDefns( true );

      //Iterate over each parameter
      Iterator iter = params.iterator( );
      while ( iter.hasNext( ) )
      {
        IParameterDefnBase param = (IParameterDefnBase) iter.next( );

        if ( param instanceof IParameterGroupDefn )
        {
          IParameterGroupDefn group = (IParameterGroupDefn) param;

          // Do something with the parameter group.
          // Iterate over group contents.
          Iterator i2 = group.getContents( ).iterator( );
          while ( i2.hasNext( ) )
          {
            IScalarParameterDefn scalar = (IScalarParameterDefn) i2.next( );
            //Get details on the parameter
            paramDetails.put( scalar.getName(), BirtUtil.loadParameterDetails( task, scalar, template, group));
          }

        }
        else
        {
          IScalarParameterDefn scalar = (IScalarParameterDefn) param;
          //get details on the parameter
          paramDetails.put( scalar.getName(), BirtUtil.loadParameterDetails( task, scalar, template, null));
        }

        // cleanup
        task.close();
      }

      // update ReportReference.parameters
      ReportReference ref = reports.get(templateName);
      Iterator<String> paramNames = paramDetails.keySet().iterator();
      while(paramNames.hasNext())
      {
        Map<String, Serializable> map = paramDetails.get(paramNames.next());
        ReportParameter paramRef = new ReportParameter(
            (String)map.get("Name"), ReportParameter.Type.valueOf((String)map.get("Type"))
        );
        paramRef.setDataType(ReportParameter.DataType.valueOf((String)map.get("DataType")));
        paramRef.setHelptext((String)map.get("Help Text"));
        paramRef.setPromptText((String)map.get("Prompt Text"));
        ref.getParameterMetaData().add(paramRef);
      }


    }
View Full Code Here

    Map<String, Object> results = new HashMap<String,Object>();
    for(String paramName : metaData.getParameters().keySet())
    {
      try
      {
        ReportReference reportRef = reports.get(metaData.getReportName());
        ReportParameter reportParam = reportRef.getParameter(paramName);
        if(null==paramName)
          throw new IllegalArgumentException("No such param "+paramName);

        String paramValue = metaData.getParameters().get(paramName);
        switch(reportParam.getDataType())
View Full Code Here

TOP

Related Classes of org.jboss.bpm.report.model.ReportReference

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.