Package org.pentaho.reporting.engine.classic.core.parameters

Examples of org.pentaho.reporting.engine.classic.core.parameters.DefaultParameterDefinition


  private ResourceManager resourceManager;
  private ResourceBundleFactory resourceBundleFactory;

  public MailDefinition()
  {
    this.parameterDefinition = new DefaultParameterDefinition();
    this.resourceBundleFactory = new DefaultResourceBundleFactory();
    this.resourceManager = new ResourceManager();
    this.resourceManager.registerDefaults();
    this.parameterValues = new ReportParameterValues();
    this.dataFactory = new CompoundDataFactory();
View Full Code Here


    {
      return;
    }

    final MasterReport report = (MasterReport) o;
    final DefaultParameterDefinition parameterDefinition = new DefaultParameterDefinition();
    for (int i = 0; i < properties.size(); i++)
    {
      final TypedPropertyReadHandler readHandler = (TypedPropertyReadHandler) properties.get(i);
      final String parameterName = readHandler.getName();
      if ("report.date".equals(parameterName))
      {
        continue;
      }
      if ("report.name".equals(parameterName))
      {
        continue;
      }
     
      final PlainParameter parameter = new PlainParameter(parameterName);
      parameter.setValueType(readHandler.getType());
      parameter.setParameterAttribute
          (ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.TYPE, "textbox");
      parameter.setDefaultValue(readHandler.getObject());
      parameterDefinition.addParameterDefinition(parameter);
    }

    report.setParameterDefinition(parameterDefinition);
  }
View Full Code Here

  private ArrayList parameterReadHandlers;

  public MasterParameterDefinitionReadHandler()
  {
    parameterReadHandlers = new ArrayList();
    parameterDefinition = new DefaultParameterDefinition();
  }
View Full Code Here

   */
  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = new MasterReport();
    report.setName("Sparkline Demo");
    final DefaultParameterDefinition paramDef = new DefaultParameterDefinition();
    final PlainParameter plainParameter = new PlainParameter("sparkline-data", Number[].class);
    plainParameter.setDefaultValue(new Number[]
        {new Integer(10), new Integer(5),
            new Integer(6), new Integer(3),
            new Integer(1), new Integer(2),
            new Integer(7), new Integer(9)});
    paramDef.addParameterDefinition(plainParameter);

    report.setParameterDefinition(paramDef);

    // using the field sparkline-data
    final BarSparklineElementFactory elementFactory = new BarSparklineElementFactory();
View Full Code Here

    // Add a listener that will handle keeping the ResourceManager in sync with changes to the Document Bundle
    addReportModelListener(new DocumentBundleChangeHandler());

    this.reportEnvironment = new DefaultReportEnvironment(getConfiguration());
    this.parameterDefinition = new DefaultParameterDefinition();
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    documentBundle.getWriteableDocumentMetaData().setBundleType(ClassicEngineBoot.BUNDLE_TYPE);
    documentBundle.getWriteableDocumentMetaData().setBundleAttribute
        (ODFMetaAttributeNames.Meta.NAMESPACE, ODFMetaAttributeNames.Meta.CREATION_DATE, new Date());
    setBundle(documentBundle);
View Full Code Here

    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setFieldname(DemoReportController.MESSAGE_TWO_FIELDNAME);
    reportHeader.addElement(factory.createElement());

    final DefaultParameterDefinition paramDef = new DefaultParameterDefinition();
    paramDef.addParameterDefinition(new PlainParameter("Message1", String.class));
    paramDef.addParameterDefinition(new PlainParameter("Message2", String.class));
    report.getParameterValues().put("Message1", inputPanel.getMessageOne());
    report.getParameterValues().put("Message2", inputPanel.getMessageTwo());
    return report;

  }
View Full Code Here

  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = parseReport();

    // The old XML formats have no sane way of defining parameters.
    final DefaultParameterDefinition paramDef = new DefaultParameterDefinition();
    paramDef.addParameterDefinition(new PlainParameter("Message1", String.class));
    paramDef.addParameterDefinition(new PlainParameter("Message2", String.class));

    report.getParameterValues().put("Message1", panel.getMessageOne());
    report.getParameterValues().put("Message2", panel.getMessageTwo());
    return report;
  }
View Full Code Here

   *          if an error occured preventing the report definition.
   */
  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = parseReport();
    final DefaultParameterDefinition parameterDefinition = new DefaultParameterDefinition();
    parameterDefinition.addParameterDefinition(new PlainParameter("REGION"));
    report.setParameterDefinition(parameterDefinition);
    return report;
  }
View Full Code Here

   * @throws ReportDefinitionException if an error occured preventing the report definition.
   */
  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = parseReport();
    final DefaultParameterDefinition parameterDefinition = new DefaultParameterDefinition();
    parameterDefinition.addParameterDefinition(new PlainParameter("REGION"));
    report.setParameterDefinition(parameterDefinition);
    return report;
  }
View Full Code Here

   * @throws ReportDefinitionException if an error occured preventing the report definition.
   */
  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = parseReport();
    final DefaultParameterDefinition parameterDefinition = new DefaultParameterDefinition();
    parameterDefinition.addParameterDefinition(new PlainParameter("REGION"));
    report.setParameterDefinition(parameterDefinition);
    return report;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.parameters.DefaultParameterDefinition

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.