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

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


  public static synchronized DataCache getCache()
  {
    if (dataCache == null && noCacheDefined == false)
    {
      final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
      final String cacheImpl = config.getConfigProperty("org.pentaho.reporting.engine.classic.core.cache.DataCache");

      dataCache = (DataCache) ObjectUtilities.loadAndInstantiate(cacheImpl, DataCacheFactory.class, DataCache.class);
      if (dataCache == null)
      {
        logger.info("Unable to create valid cache, returning <null>");
View Full Code Here


  public static synchronized OlapConnectionReadHandlerFactory getInstance()
  {
    if (readHandlerFactory == null)
    {
      readHandlerFactory = new OlapConnectionReadHandlerFactory();
      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

  public static synchronized CubeFileProviderReadHandlerFactory getInstance()
  {
    if (readHandlerFactory == null)
    {
      readHandlerFactory = new CubeFileProviderReadHandlerFactory();
      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

  public static synchronized DataSourceProviderReadHandlerFactory getInstance()
  {
    if (readHandlerFactory == null)
    {
      readHandlerFactory = new DataSourceProviderReadHandlerFactory();
      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 DataSourceProvider connectionProvider)
      throws IOException, BundleWriterException
  {
    final String configKey = MondrianDataFactoryModule.DATASOURCE_BUNDLEWRITER_PREFIX + connectionProvider.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value == null)
    {
      throw new BundleWriterException("Unable to locate writer for " + connectionProvider.getClass().getName());
    }
    final DataSourceProviderBundleWriteHandler handler =
View Full Code Here

                             final XmlWriter xmlWriter,
                             final CubeFileProvider cubeFileProvider)
      throws IOException, BundleWriterException
  {
    final String configKey = MondrianDataFactoryModule.CUBEFILE_BUNDLEWRITER_PREFIX + cubeFileProvider.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value == null)
    {
      throw new BundleWriterException("Unable to locate writer for " + cubeFileProvider.getClass().getName());
    }
View Full Code Here

  }


  private String filter(final String role) throws ReportDataFactoryException
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    if ("true".equals(configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.role-filter.enable")) == false)
    {
      return role;
    }

    final Iterator staticDenyKeys = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.role-filter.static.deny");
    while (staticDenyKeys.hasNext())
    {
      final String key = (String) staticDenyKeys.next();
      final String value = configuration.getConfigProperty(key);
      if (ObjectUtilities.equal(value, role))
      {
        return null;
      }
    }

    final Iterator regExpDenyKeys = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.role-filter.reg-exp.deny");
    while (regExpDenyKeys.hasNext())
    {
      final String key = (String) regExpDenyKeys.next();
      final String value = configuration.getConfigProperty(key);
      try
      {
        if (role.matches(value))
        {
          return null;
        }
      }
      catch (PatternSyntaxException pe)
      {
        throw new ReportDataFactoryException("Unable to match reg-exp role filter:", pe);
      }
    }

    boolean hasAccept = false;
    final Iterator staticAcceptKeys = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.role-filter.static.accept");
    while (staticAcceptKeys.hasNext())
    {
      hasAccept = true;
      final String key = (String) staticAcceptKeys.next();
      final String value = configuration.getConfigProperty(key);
      if (ObjectUtilities.equal(value, role))
      {
        return role;
      }
    }

    final Iterator regExpAcceptKeys = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.role-filter.reg-exp.accept");
    while (regExpAcceptKeys.hasNext())
    {
      hasAccept = true;
      final String key = (String) regExpAcceptKeys.next();
      final String value = configuration.getConfigProperty(key);
      try
      {
        if (role.matches(value))
        {
          return role;
View Full Code Here

    return b.toString();
  }

  private String filter(final String role) throws ReportDataFactoryException
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    if ("true".equals(configuration.getConfigProperty(ROLE_FILTER_ENABLE_CONFIG_KEY)) == false)
    {
      return role;
    }

    final Iterator staticDenyKeys = configuration.findPropertyKeys(DENY_ROLE_CONFIG_KEY);
    while (staticDenyKeys.hasNext())
    {
      final String key = (String) staticDenyKeys.next();
      final String value = configuration.getConfigProperty(key);
      if (ObjectUtilities.equal(value, role))
      {
        return null;
      }
    }

    final Iterator regExpDenyKeys = configuration.findPropertyKeys(DENY_REGEXP_CONFIG_KEY);
    while (regExpDenyKeys.hasNext())
    {
      final String key = (String) regExpDenyKeys.next();
      final String value = configuration.getConfigProperty(key);
      try
      {
        if (role.matches(value))
        {
          return null;
        }
      }
      catch (PatternSyntaxException pe)
      {
        throw new ReportDataFactoryException("Unable to match reg-exp role filter:", pe);
      }
    }

    boolean hasAccept = false;
    final Iterator staticAcceptKeys = configuration.findPropertyKeys(ACCEPT_ROLES_CONFIG_KEY);
    while (staticAcceptKeys.hasNext())
    {
      hasAccept = true;
      final String key = (String) staticAcceptKeys.next();
      final String value = configuration.getConfigProperty(key);
      if (ObjectUtilities.equal(value, role))
      {
        return role;
      }
    }

    final Iterator regExpAcceptKeys = configuration.findPropertyKeys(ACCEPT_REGEXP_CONFIG_KEY);
    while (regExpAcceptKeys.hasNext())
    {
      hasAccept = true;
      final String key = (String) regExpAcceptKeys.next();
      final String value = configuration.getConfigProperty(key);
      try
      {
        if (role.matches(value))
        {
          return role;
View Full Code Here

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

                                   final XmlWriter xmlWriter,
                                   final DataSourceProvider connectionProvider)
      throws IOException, ReportWriterException
  {
    final String configKey = MondrianDataFactoryModule.DATASOURCE_WRITER_PREFIX + connectionProvider.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value == null)
    {
      throw new ReportWriterException("Unable to locate writer for " + connectionProvider.getClass().getName());
    }
    final DataSourceProviderWriteHandler handler =
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.