Package org.pentaho.reporting.libraries.base.config

Examples of org.pentaho.reporting.libraries.base.config.Configuration


  public static synchronized ConnectionReadHandlerFactory getInstance()
  {
    if (readHandlerFactory == null)
    {
      readHandlerFactory = new ConnectionReadHandlerFactory();
      final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
      final Iterator propertyKeys = config.findPropertyKeys(PREFIX_SELECTOR);
      while (propertyKeys.hasNext())
      {
        final String key = (String) propertyKeys.next();
        final String value = config.getConfigProperty(key);
        if (value != null)
        {
          readHandlerFactory.configure(config, value);
        }
      }
View Full Code Here


                                   final XmlWriter xmlWriter,
                                   final ConnectionProvider connectionProvider)
      throws IOException, BundleWriterException
  {
    final String configKey = SQLDataFactoryModule.CONNECTION_WRITER_PREFIX + connectionProvider.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value != null)
    {
      final ConnectionProviderWriteHandler handler =
          (ConnectionProviderWriteHandler) ObjectUtilities.loadAndInstantiate
              (value, SQLReportDataFactory.class, ConnectionProviderWriteHandler.class);
View Full Code Here

    getFormValidator().registerTextField(txFilename);
    getFormValidator().registerComboBox(cbEncoding);

    final JPanel exportPane = createExportPanel();

    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    final boolean advancedSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.html.stream.AdvancedSettingsAvailable"));
    final boolean metaDataSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.html.stream.MetaDataSettingsAvailable"));
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(getResources().getString("htmlexportdialog.export-settings"), exportPane); //$NON-NLS-1$
    tabbedPane.add(getResources().getString("htmlexportdialog.parameters"), getParametersPanel()); //$NON-NLS-1$
View Full Code Here

                                   final XmlWriter xmlWriter,
                                   final ConnectionProvider connectionProvider)
      throws IOException, BundleWriterException
  {
    final String configKey = SQLDataFactoryModule.CONNECTION_WRITER_PREFIX + connectionProvider.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value != null)
    {
      final ConnectionProviderWriteHandler handler =
          (ConnectionProviderWriteHandler) ObjectUtilities.loadAndInstantiate
              (value, SQLReportDataFactory.class, ConnectionProviderWriteHandler.class);
View Full Code Here

      {
        this.messages = new Messages(Locale.getDefault(), HtmlExportGUIModule.BASE_RESOURCE_CLASS,
            ObjectUtilities.getClassLoader(HtmlExportGUIModule.class));
      }

      final Configuration config = report.getConfiguration();
      final String targetFileName = config.getConfigProperty
          ("org.pentaho.reporting.engine.classic.core.modules.gui.html.stream.TargetFileName"); //$NON-NLS-1$
      if (targetFileName == null)
      {
        throw new ReportProcessingException(messages.getErrorString(
            "HtmlStreamExportTask.ERROR_0002_TARGET_NOT_SET")); //$NON-NLS-1$
View Full Code Here

    if (report == null)
    {
      throw new NullPointerException("PlainTextExportTask(): Report parameter must not be null"); //$NON-NLS-1$
    }

    final Configuration config = report.getConfiguration();
    fileName = config.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.plaintext.FileName"); //$NON-NLS-1$
    final String selectedPrinterText = config.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.plaintext.ExportType"); //$NON-NLS-1$
    if ("9pin".equals(selectedPrinterText)) //$NON-NLS-1$
    {
      exportType = PlainTextExportDialog.TYPE_EPSON9_OUTPUT;
      printer = config.getConfigProperty
          (Epson9PinPrinterDriver.EPSON_9PIN_PRINTER_TYPE);
    }
    else if ("24pin".equals(selectedPrinterText)) //$NON-NLS-1$
    {
      exportType = PlainTextExportDialog.TYPE_EPSON24_OUTPUT;
      printer = config.getConfigProperty
          (Epson24PinPrinterDriver.EPSON_24PIN_PRINTER_TYPE);
    }
    else if ("ibm".equals(selectedPrinterText)) //$NON-NLS-1$
    {
      exportType = PlainTextExportDialog.TYPE_IBM_OUTPUT;
View Full Code Here

    getFormValidator().registerTextField(txConfUserPassword);
    getFormValidator().registerTextField(txUserPassword);
    getFormValidator().registerTextField(txOwnerPassword);

    final JPanel exportPane = createExportPanel();
    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    final boolean advancedSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.pdf.AdvancedSettingsAvailable"));
    final boolean metaDataSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.pdf.MetaDataSettingsAvailable"));
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(getResources().getString("pdfsavedialog.export-settings"), exportPane); //$NON-NLS-1$
    tabbedPane.add(getResources().getString("pdfsavedialog.parameters"), getParametersPanel());
View Full Code Here

  private BundleWriterHandler[] masterWriter;
  private BundleWriterHandler[] subreportWriter;

  public BundleWriter()
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator masterKeys = configuration.findPropertyKeys(MASTER_HANDLER_PREFIX);
    final ArrayList masterWriterList = new ArrayList();
    while (masterKeys.hasNext())
    {
      final String key = (String) masterKeys.next();
      final String className = configuration.getConfigProperty(key);
      final BundleWriterHandler handler = (BundleWriterHandler)
          ObjectUtilities.loadAndInstantiate(className, BundleWriter.class, BundleWriterHandler.class);
      if (handler != null)
      {
        masterWriterList.add(handler);
      }
    }
    masterWriter = (BundleWriterHandler[]) masterWriterList.toArray(new BundleWriterHandler[masterWriterList.size()]);
    if (masterWriter.length == 0)
    {
      throw new IllegalStateException("Bundle-Writer configuration is invalid.");
    }

    // Sort the list of BundleWriterHandlers so the processing occurs in a better defined order
    sortBundleWriterHandlers(masterWriter);

    masterWriterList.clear();
    final Iterator subKeys = configuration.findPropertyKeys(SUBREPORT_HANDLER_PREFIX);
    while (subKeys.hasNext())
    {
      final String key = (String) subKeys.next();
      final String className = configuration.getConfigProperty(key);
      final BundleWriterHandler handler = (BundleWriterHandler)
          ObjectUtilities.loadAndInstantiate(className, BundleWriter.class, BundleWriterHandler.class);
      if (handler != null)
      {
        masterWriterList.add(handler);
View Full Code Here

  }

  public static void createTextFile(final MasterReport report, final String filename)
      throws IOException, ReportProcessingException
  {
    final Configuration configuration = report.getConfiguration();
    final String cpiText = configuration.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.CharsPerInch");
    final String lpiText = configuration.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.LinesPerInch");

    createTextFile(report, filename, ParserUtil.parseInt(cpiText, 10), ParserUtil.parseInt(lpiText, 6));
  }
View Full Code Here

  public static void createPlainText(final MasterReport report,
                                     final String filename)
      throws IOException, ReportProcessingException
  {
    final Configuration configuration = report.getConfiguration();
    final String cpiText = configuration.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.CharsPerInch");
    final String lpiText = configuration.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.LinesPerInch");

    createPlainText(report, filename, ParserUtil.parseInt(cpiText, 10), ParserUtil.parseInt(lpiText, 6));
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.config.Configuration

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.