Package org.apache.ofbiz.service.config
Class ServiceConfigUtil
java.lang.Object
org.apache.ofbiz.service.config.ServiceConfigUtil
A
ServiceConfig
factory and related utility methods.
The ServiceConfig
instance models the serviceengine.xml
file
and the instance is kept in the "service.ServiceConfig" cache. Clearing the cache will reload
the service configuration file. Client code that depends on the serviceengine.xml
file can be notified when the file is reloaded by implementing ServiceConfigListener
and registering itself using the registerServiceConfigListener(ServiceConfigListener)
method.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
getEngineParameter
(String engineName, String parameterName) Returns the specified parameter value from the specified engine, ornull
if the engine or parameter are not found.static ServiceConfig
Returns theServiceConfig
instance.static ServiceEngine
Returns the default service engine configuration (named "default").static ServiceEngine
getServiceEngine
(String name) Returns the specifiedServiceEngine
configuration instance, ornull
if the configuration does not exist.static String
static void
Register aServiceConfigListener
instance.
-
Method Details
-
getEngineParameter
public static String getEngineParameter(String engineName, String parameterName) throws GenericConfigException Returns the specified parameter value from the specified engine, ornull
if the engine or parameter are not found.- Parameters:
engineName
-parameterName
-- Returns:
- Throws:
GenericConfigException
-
getServiceConfig
Returns theServiceConfig
instance.- Throws:
GenericConfigException
-
getServiceEngine
Returns the default service engine configuration (named "default").- Throws:
GenericConfigException
-
getServiceEngine
Returns the specifiedServiceEngine
configuration instance, ornull
if the configuration does not exist.- Throws:
GenericConfigException
-
registerServiceConfigListener
Register aServiceConfigListener
instance. The instance will be notified when theserviceengine.xml
file is reloaded.- Parameters:
listener
-
-
getEngine
-
getServiceEngineXmlFileName
-