com.sap.tc.webdynpro.services.sal.config.api
Class WDConfiguration
java.lang.Object
|
+--com.sap.tc.webdynpro.services.sal.config.api.WDConfiguration
- public abstract class WDConfiguration
- extends java.lang.Object
WDConfiguration provides static methods to access
an IWDConfiguration instance. The configuration can be
located on the following different context levels:
- On the level of the deployable object.
- On the level of a specific deployable object part.
The name of the configuration unit can be automatically derived from the
context using the methods getConfiguration, or it is stated
explicitly by the user via the methods getConfigurationByName.
Example: An IWDConfiguration with name "testConfig" that is
located on the level of a deployable object, can be accessed as follows:
// let objectName be the name of the deployable object
IWDConfiguration configuration = WDConfiguration.getConfiguration(objectName, "testConfig");
- See Also:
IWDConfiguration
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WDConfiguration
public WDConfiguration()
getConfiguration
public static IWDConfiguration getConfiguration(java.lang.String objectName)
throws WDConfigurationNotFoundException
- Returns the default configuration object named
default.properties
of the specified deployable object if existing. If not existing, a
WDConfigurationNotFoundException is thrown.
- Parameters:
objectName - the name of the deployable object for which the configuration should be loaded- Returns:
- the default configuration object named "default.properties"
- Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
getConfigurationByName
public static IWDConfiguration getConfigurationByName(java.lang.String objectName,
java.lang.String configName)
throws WDConfigurationNotFoundException
- Returns the configuration specified by
configName. This configuration unit
is expected to be contained in the specified deployable object.
Example:
On the level of a deployable Object named "testObject", there is a property file named "testConfig.properties".
Then, you can access this configuration unit using the following call:
IWDConfiguration cfg = WDConfiguration.getConfigurationByName("testObject", "testConfig.properties");
// alternatively:
cfg = WDConfiguration.getConfigurationByName("testObject", "testConfig");
- Parameters:
objectName - the name of the deployable object for which the configuration should be loadedconfigName - the name of the configuration unit- Returns:
- the configuration specified by
configName - Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
getConfiguration
public static IWDConfiguration getConfiguration(IWDDeployableObject deployableObject)
throws WDConfigurationNotFoundException
- Returns the default configuration object named
default.properties
of the specified deployable object if existing. If not existing, a
WDConfigurationNotFoundException is thrown.
- Parameters:
deployableObject - the deployable object for which the configuration should be loaded- Returns:
- the default configuration object named "default.properties"
- Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
getConfigurationByName
public static IWDConfiguration getConfigurationByName(IWDDeployableObject deployableObject,
java.lang.String configName)
throws WDConfigurationNotFoundException
- Returns the configuration specified by
configName. This configuration unit
is expected to be contained in the specified deployable object. Otherwise a
WDConfigurationNotFoundException is thrown.
Example: On the level of a deployable Object "testObject", there is a property file named "testConfig.properties".
Then, you can access this configuration unit using the following call:
IWDDeployableObject testObject = ...; // some coding to get the deployable object
IWDConfiguration cfg = WDConfiguration.getConfigurationByName(testObject, "testConfig.properties");
// alternatively:
cfg = WDConfiguration.getConfigurationByName(testObject, "testConfig");
- Parameters:
objectName - the deployable object for which the configuration should be loadedconfigName - the name of the configuration unit- Returns:
- the configuration specified by
configName - Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
getConfiguration
public static IWDConfiguration getConfiguration(WDDeployableObjectPart deployableObjectPart)
throws WDConfigurationNotFoundException
- Returns the configuration object named
.properties
for the specified deployable object part if existing. If not existing, a
WDConfigurationNotFoundException is thrown.
Example: Let "com.sap.test.TestPart" be the name of a deployable object part. Then, using a reference
to a WDDeployableObjectPart that represents this part, the method will look for a configuration unit
called "TestPart.properties" on the level of the given part.
- Parameters:
deployableObjectPart - the name of the deployable object part- Returns:
- the configuration object
- Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
getConfigurationByName
public static IWDConfiguration getConfigurationByName(WDDeployableObjectPart deployableObjectPart,
java.lang.String configName)
throws WDConfigurationNotFoundException
- Returns the configuration specified by
configName. This configuration unit
is expected to be contained in the specified deployable object under the specified
application context. Otherwise a WDConfigurationNotFoundException is thrown.
- Parameters:
deployableObjectPart - the name of the deployable object partconfigName - the name of the configuration unit- Returns:
- the configuration specified by
configName - Throws:
WDConfigurationNotFoundException - if the configuration instance couldn't be created
Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15