Package lumis.portal.service
Class ServiceManager
- java.lang.Object
-
- lumis.portal.service.ServiceManager
-
- All Implemented Interfaces:
IConfigKeyChecker
,IServiceManager
public class ServiceManager extends Object implements IServiceManager
Manager for all operations on Services- Since:
- 4.0.0
- Version:
- $Revision: 18030 $ $Date: 2015-12-01 12:01:54 -0200 (Tue, 01 Dec 2015) $
-
-
Constructor Summary
Constructors Constructor Description ServiceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear the manager cache entries for Services, Service Configs and Service Types.ServiceConfig
get(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Get the configuration of the service.Collection<String>
getPreBuiltChannelFiles(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Returns a collection of paths to the pre built channel files for the specified service.IService
getService(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Get the service.Collection<ServiceConfig>
getServices(SessionConfig sessionConfig, boolean getInstantiableServicesOnly, ITransaction transaction)
Get services.ServiceTypeConfig
getServiceTypeConfig(SessionConfig sessionConfig, String serviceType, ITransaction transaction)
boolean
keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
Checks if configId matches an already persisted objectvoid
register(SessionConfig sessionConfig, String serviceConfigPath, ITransaction transaction)
Servicevoid
registerServiceTypes(SessionConfig sessionConfig, String serviceTypesConfigPath, ITransaction transaction)
Register the types of service.void
unregister(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Unregister a service.void
unregisterServiceType(SessionConfig sessionConfig, String typeId, ITransaction transaction)
Unregister the service´s type.
-
-
-
Method Detail
-
register
public void register(SessionConfig sessionConfig, String serviceConfigPath, ITransaction transaction) throws PortalException
Service- Specified by:
register
in interfaceIServiceManager
- Throws:
ManagerException
PortalException
-
unregister
public void unregister(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Unregister a service.- Specified by:
unregister
in interfaceIServiceManager
- Parameters:
sessionConfig
- identifier for the session.serviceId
- the id of the service.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
get
public ServiceConfig get(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Get the configuration of the service.- Specified by:
get
in interfaceIServiceManager
- Returns:
- Returns the ServiceConfig.
- Throws:
ManagerException
PortalException
-
getService
public IService getService(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Get the service.- Specified by:
getService
in interfaceIServiceManager
- Returns:
- an IService.
- Throws:
ManagerException
PortalException
-
getServices
public Collection<ServiceConfig> getServices(SessionConfig sessionConfig, boolean getInstantiableServicesOnly, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Get services.- Specified by:
getServices
in interfaceIServiceManager
- Returns:
- a ServiceConfig array.
- Throws:
ManagerException
PortalException
-
registerServiceTypes
public void registerServiceTypes(SessionConfig sessionConfig, String serviceTypesConfigPath, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Register the types of service.- Specified by:
registerServiceTypes
in interfaceIServiceManager
- Throws:
ManagerException
PortalException
-
unregisterServiceType
public void unregisterServiceType(SessionConfig sessionConfig, String typeId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceManager
Unregister the service´s type.- Specified by:
unregisterServiceType
in interfaceIServiceManager
- Throws:
ManagerException
PortalException
-
getServiceTypeConfig
public ServiceTypeConfig getServiceTypeConfig(SessionConfig sessionConfig, String serviceType, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
getPreBuiltChannelFiles
public Collection<String> getPreBuiltChannelFiles(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceManager
Returns a collection of paths to the pre built channel files for the specified service. The paths are all relative to the definition path.- Specified by:
getPreBuiltChannelFiles
in interfaceIServiceManager
- Parameters:
sessionConfig
- the user session information.serviceId
- the service id.transaction
- the transaction for persistence access.- Returns:
- a collection of paths to the pre built channel files for the specified service.
- Throws:
PortalException
-
clearCache
public void clearCache() throws PortalException
Description copied from interface:IServiceManager
Clear the manager cache entries for Services, Service Configs and Service Types.- Specified by:
clearCache
in interfaceIServiceManager
- Throws:
PortalException
-
keyExists
public boolean keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
Description copied from interface:IConfigKeyChecker
Checks if configId matches an already persisted object- Specified by:
keyExists
in interfaceIConfigKeyChecker
config
- Optional, allows a checker to read aditional fields to check composed keys- Returns:
- true if configId matches an already persisted object
-
-