Package com.jalios.jcms.service
Class ServiceManager
- java.lang.Object
-
- com.jalios.jcms.service.ServiceManager
-
- All Implemented Interfaces:
JPropertiesListener
public final class ServiceManager extends java.lang.Object implements JPropertiesListener
-
-
Field Summary
-
Fields inherited from interface com.jalios.util.JPropertiesListener
REVISION
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceResponse
executeService(java.lang.String serviceName, ServiceForm form)
Executes a service.static ServiceManager
getInstance()
boolean
hasService(java.lang.String serviceName)
Checks whether the service with the given name exists.void
loadServices(JProperties properties)
void
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.void
registerService(java.lang.String serviceName, Service service)
Registers a new service associated to the given service name.ServiceResponse
sendServiceAction(java.lang.String action, ServiceForm form)
void
unregisterService(java.lang.String serviceName)
Unregisters the service associated to the given service name.
-
-
-
Method Detail
-
getInstance
public static ServiceManager getInstance()
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListener
Invoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- Parameters:
properties
- the properties which have been submitted to change
-
registerService
public void registerService(java.lang.String serviceName, Service service)
Registers a new service associated to the given service name.- Parameters:
serviceName
- service name to registerservice
- Service to register
-
unregisterService
public void unregisterService(java.lang.String serviceName)
Unregisters the service associated to the given service name.- Parameters:
serviceName
- service name to unregister
-
loadServices
public void loadServices(JProperties properties)
- Parameters:
properties
-
-
sendServiceAction
public ServiceResponse sendServiceAction(java.lang.String action, ServiceForm form)
-
executeService
public ServiceResponse executeService(java.lang.String serviceName, ServiceForm form)
Executes a service.- Parameters:
serviceName
- service name to executeform
- Form sent to the service- Returns:
- the result of the service execution
-
hasService
public boolean hasService(java.lang.String serviceName)
Checks whether the service with the given name exists.- Parameters:
serviceName
- Service name- Returns:
true
if the service exists,false
instead
-
-