Class Java14ConfigStorage

  • All Implemented Interfaces:
    org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStorage

    public class Java14ConfigStorage
    extends Object
    implements org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStorage
    A configuration storage provider which stores the entries using the JDK 1.4 configuration API.
    Author:
    Thomas Morgner
    • Constructor Summary

      Constructors 
      Constructor Description
      Java14ConfigStorage​(Preferences base)
      Creates a new storage, which uses the given preferences node as base for all operations.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAvailable​(String configPath)
      Tests, whether some configuration data exists for the given configuration.
      org.pentaho.reporting.libraries.base.config.Configuration load​(String configPath, org.pentaho.reporting.libraries.base.config.Configuration defaults)
      Loads the properties from the given path, specifying the given properties as default.
      void store​(String configPath, org.pentaho.reporting.libraries.base.config.Configuration config)
      Stores the given properties on the defined path.
    • Constructor Detail

      • Java14ConfigStorage

        public Java14ConfigStorage​(Preferences base)
        Creates a new storage, which uses the given preferences node as base for all operations.
        Parameters:
        base - the base node.
    • Method Detail

      • store

        public void store​(String configPath,
                          org.pentaho.reporting.libraries.base.config.Configuration config)
                   throws org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStoreException
        Stores the given properties on the defined path.
        Specified by:
        store in interface org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStorage
        Parameters:
        configPath - the path on where to store the properties.
        config - the properties which should be stored.
        Throws:
        org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStoreException - if an error occurred.
      • load

        public org.pentaho.reporting.libraries.base.config.Configuration load​(String configPath,
                                                                              org.pentaho.reporting.libraries.base.config.Configuration defaults)
                                                                       throws org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStoreException
        Loads the properties from the given path, specifying the given properties as default.
        Specified by:
        load in interface org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStorage
        Parameters:
        configPath - the configuration path from where to read the properties.
        defaults - the property set that acts as fallback to provide default values.
        Returns:
        the loaded properties
        Throws:
        org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStoreException - if an error occurred.
      • isAvailable

        public boolean isAvailable​(String configPath)
        Tests, whether some configuration data exists for the given configuration.
        Specified by:
        isAvailable in interface org.pentaho.reporting.engine.classic.core.modules.misc.configstore.base.ConfigStorage
        Parameters:
        configPath - the configuration path to the property storage.
        Returns:
        true, if there are properties under this path, false otherwise.