Class SystemSettings
- java.lang.Object
-
- org.pentaho.platform.engine.core.system.PentahoBase
-
- org.pentaho.platform.engine.core.system.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 Summary
Fields Modifier and Type Field Description static String
PENTAHOSETTINGSFILENAME
This constant is for the overall system settings file name.-
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase
EMPTYLOGID, loggingLevel, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description SystemSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getAbsolutePath(String path)
Create a String containing the complete path to the system folder in the repository, and append the parameterpath
to it.org.apache.commons.logging.Log
getLogger()
org.dom4j.Document
getSettingsDocumentFromFile(File f)
protected static String
getSolutionPath()
String
getSystemCfgSourceName()
String
getSystemSetting(String settingName, String defaultValue)
String
getSystemSetting(String path, String settingName, String defaultValue)
List
getSystemSettings(String settingName)
List
getSystemSettings(String path, String settingName)
org.dom4j.Document
getSystemSettingsDocument(String actionPath)
Get the DOM document initialized by the file specified in theactionPath
parameter.Properties
getSystemSettingsProperties(String path)
void
resetSettingsCache()
-
Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn
-
-
-
-
Field Detail
-
PENTAHOSETTINGSFILENAME
public static final String PENTAHOSETTINGSFILENAME
This constant is for the overall system settings file name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSystemSetting
public String getSystemSetting(String path, String settingName, String defaultValue)
- Specified by:
getSystemSetting
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
getSystemSetting
public String getSystemSetting(String settingName, String defaultValue)
- Specified by:
getSystemSetting
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
getSystemSettings
public List getSystemSettings(String path, String settingName)
- Specified by:
getSystemSettings
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
getSystemSettings
public List getSystemSettings(String settingName)
- Specified by:
getSystemSettings
in interfaceorg.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 theactionPath
parameter. If this is the first time the document associated withactionPath
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 interfaceorg.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 parameterpath
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 classPentahoBase
-
resetSettingsCache
public void resetSettingsCache()
- Specified by:
resetSettingsCache
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
getSystemSettingsProperties
public Properties getSystemSettingsProperties(String path)
- Specified by:
getSystemSettingsProperties
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
getSystemCfgSourceName
public String getSystemCfgSourceName()
- Specified by:
getSystemCfgSourceName
in interfaceorg.pentaho.platform.api.engine.ISystemSettings
-
-