Package org.apache.ofbiz.service.config
Class ServiceConfigUtil
- java.lang.Object
-
- org.apache.ofbiz.service.config.ServiceConfigUtil
-
public final class ServiceConfigUtil extends java.lang.Object
AServiceConfig
factory and related utility methods.The
ServiceConfig
instance models theserviceengine.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 theserviceengine.xml
file can be notified when the file is reloaded by implementingServiceConfigListener
and registering itself using theregisterServiceConfigListener(ServiceConfigListener)
method.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getEngine()
static java.lang.String
getEngineParameter(java.lang.String engineName, java.lang.String parameterName)
Returns the specified parameter value from the specified engine, ornull
if the engine or parameter are not found.static ServiceConfig
getServiceConfig()
Returns theServiceConfig
instance.static ServiceEngine
getServiceEngine()
Returns the default service engine configuration (named "default").static ServiceEngine
getServiceEngine(java.lang.String name)
Returns the specifiedServiceEngine
configuration instance, ornull
if the configuration does not exist.static java.lang.String
getServiceEngineXmlFileName()
static void
registerServiceConfigListener(ServiceConfigListener listener)
Register aServiceConfigListener
instance.
-
-
-
Method Detail
-
getEngineParameter
public static java.lang.String getEngineParameter(java.lang.String engineName, java.lang.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
public static ServiceConfig getServiceConfig() throws GenericConfigException
Returns theServiceConfig
instance.- Throws:
GenericConfigException
-
getServiceEngine
public static ServiceEngine getServiceEngine() throws GenericConfigException
Returns the default service engine configuration (named "default").- Throws:
GenericConfigException
-
getServiceEngine
public static ServiceEngine getServiceEngine(java.lang.String name) throws GenericConfigException
Returns the specifiedServiceEngine
configuration instance, ornull
if the configuration does not exist.- Throws:
GenericConfigException
-
registerServiceConfigListener
public static void registerServiceConfigListener(ServiceConfigListener listener)
Register aServiceConfigListener
instance. The instance will be notified when theserviceengine.xml
file is reloaded.- Parameters:
listener
-
-
getEngine
public static java.lang.String getEngine()
-
getServiceEngineXmlFileName
public static java.lang.String getServiceEngineXmlFileName()
-
-