org.pentaho.platform.engine.core.system
Class PathBasedSystemSettings
java.lang.Object
org.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.engine.core.system.SystemSettings
org.pentaho.platform.engine.core.system.PathBasedSystemSettings
- All Implemented Interfaces:
- Serializable, ILogger, ISystemSettings
public class PathBasedSystemSettings
- extends SystemSettings
Behavior is identical to SystemSettings
except that the settings
for PentahoSystem
can live in an arbitrary location in the file system
(i.e. the file does not have to exist in the /system). The location of
the file used to initialize PentahoSystem
is specified by the
System
property whose key is SYSTEM_CFG_PATH_KEY
.
If this key does not exist in the System
properties, then this
class falls back on the behavior of SystemSettings (i.e. it gets the system
settings from /system/pentaho.xml).
- Author:
- Steven Barkdull
- See Also:
- Serialized Form
Field Summary |
static String |
SYSTEM_CFG_PATH_KEY
key into System.property containing the path to the file
containing settings information for PentahoSystem . |
Fields inherited from interface org.pentaho.platform.api.engine.ILogger |
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN |
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 |
SYSTEM_CFG_PATH_KEY
public static final String SYSTEM_CFG_PATH_KEY
- key into System.property containing the path to the file
containing settings information for
PentahoSystem
.
- See Also:
- Constant Field Values
PathBasedSystemSettings
public PathBasedSystemSettings()
getSystemSetting
public String getSystemSetting(String settingName,
String defaultValue)
- Description copied from interface:
ISystemSettings
- Gets a system setting from the system configuration file
- Specified by:
getSystemSetting
in interface ISystemSettings
- Overrides:
getSystemSetting
in class SystemSettings
- Parameters:
settingName
- the setting name to getdefaultValue
- the value to use if the setting isn't specified in the setting
document
- Returns:
- the setting requested, or the default value if not found
getSystemSettings
public List getSystemSettings(String settingName)
- Description copied from interface:
ISystemSettings
- Gets a section from the system system configuration file
- Specified by:
getSystemSettings
in interface ISystemSettings
- Overrides:
getSystemSettings
in class SystemSettings
- Parameters:
settingName
- the section to retrieve
- Returns:
- the list of elements in the section of the document.
getSystemCfgSourceName
public String getSystemCfgSourceName()
- Description copied from interface:
ISystemSettings
- Gets the name of the source of the system configurations. For system configurations
that are stored in a file, it should return the filename. Other implementations
should return a name that is relevant to the implementation
(possibly a URL, or a database sql query, etc.)
Often this will be pentaho.xml
- Specified by:
getSystemCfgSourceName
in interface ISystemSettings
- Overrides:
getSystemCfgSourceName
in class SystemSettings
- Returns:
- String containing a name that identifies the source
of the system configuration
getSettingsDocumentFromFile
public org.dom4j.Document getSettingsDocumentFromFile(File f)
throws IOException,
org.dom4j.DocumentException
- Overrides:
getSettingsDocumentFromFile
in class SystemSettings
- Throws:
IOException
org.dom4j.DocumentException