Class SystemSettings

  • All Implemented Interfaces:
    Serializable, org.pentaho.platform.api.engine.ILogger, org.pentaho.platform.api.engine.ISystemSettings
    Direct Known Subclasses:
    PathBasedSystemSettings

    public class SystemSettings
    extends PentahoBase
    implements org.pentaho.platform.api.engine.ISystemSettings
    Provides system settings data for system configuration files located in the system folder of the repository. System settings for PentahoSystem are hardcoded to exist in /system/pentaho.xml. Provides a settings cache so that settings are read from the file once, and the associated DOM document is cached in memory for future lookups.
    Author:
    unknown
    See Also:
    Serialized Form
    • Field Detail

      • PENTAHOSETTINGSFILENAME

        public static final String PENTAHOSETTINGSFILENAME
        This constant is for the overall system settings file name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SystemSettings

        public SystemSettings()
    • Method Detail

      • getSystemSetting

        public String getSystemSetting​(String path,
                                       String settingName,
                                       String defaultValue)
        Specified by:
        getSystemSetting in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSystemSetting

        public String getSystemSetting​(String settingName,
                                       String defaultValue)
        Specified by:
        getSystemSetting in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSystemSettings

        public List getSystemSettings​(String path,
                                      String settingName)
        Specified by:
        getSystemSettings in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSystemSettings

        public List getSystemSettings​(String settingName)
        Specified by:
        getSystemSettings in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSettingsDocumentFromFile

        public org.dom4j.Document getSettingsDocumentFromFile​(File f)
                                                       throws IOException,
                                                              org.dom4j.DocumentException
        Throws:
        IOException
        org.dom4j.DocumentException
      • getSystemSettingsDocument

        public org.dom4j.Document getSystemSettingsDocument​(String actionPath)
        Get the DOM document initialized by the file specified in the actionPath parameter. If this is the first time the document associated with actionPath has been requested, cache the DOM document. If this is not the first time the document has been requested, return the document from the cache.
        Specified by:
        getSystemSettingsDocument in interface org.pentaho.platform.api.engine.ISystemSettings
      • getAbsolutePath

        protected String getAbsolutePath​(String path)
        Create a String containing the complete path to the system folder in the repository, and append the parameter path to it.
        Parameters:
        path - String containing the path of a file relative to the system folder in the repository
        Returns:
        String containing the path
      • getSolutionPath

        protected static String getSolutionPath()
      • getLogger

        public org.apache.commons.logging.Log getLogger()
        Specified by:
        getLogger in class PentahoBase
      • resetSettingsCache

        public void resetSettingsCache()
        Specified by:
        resetSettingsCache in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSystemSettingsProperties

        public Properties getSystemSettingsProperties​(String path)
        Specified by:
        getSystemSettingsProperties in interface org.pentaho.platform.api.engine.ISystemSettings
      • getSystemCfgSourceName

        public String getSystemCfgSourceName()
        Specified by:
        getSystemCfgSourceName in interface org.pentaho.platform.api.engine.ISystemSettings