Package lumis.portal.service
Class ServiceManager
- java.lang.Object
-
- lumis.portal.service.ServiceManager
-
- All Implemented Interfaces:
IConfigKeyChecker
,IServiceManager
public class ServiceManager extends java.lang.Object implements IServiceManager
Manager for all operations on Services- Since:
- 4.0.0
- Version:
- $Revision: 25123 $ $Date: 2022-07-05 13:15:45 -0300 (Tue, 05 Jul 2022) $
-
-
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, java.lang.String serviceId, ITransaction transaction)
Get the configuration of the service.java.util.Collection<java.lang.String>
getPreBuiltChannelFiles(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction)
Returns a collection of paths to the pre built channel files for the specified service.IService
getService(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction)
Get the service.java.util.Collection<ServiceConfig>
getServices(SessionConfig sessionConfig, boolean getInstantiableServicesOnly, ITransaction transaction)
Get services.ServiceTypeConfig
getServiceTypeConfig(SessionConfig sessionConfig, java.lang.String serviceType, ITransaction transaction)
boolean
keyExists(SessionConfig sessionConfig, java.lang.Object configKey, java.lang.Object config, ITransaction transaction)
Checks if configId matches an already persisted objectvoid
register(SessionConfig sessionConfig, java.lang.String serviceConfigPath, ITransaction transaction)
Servicevoid
registerServiceTypes(SessionConfig sessionConfig, java.lang.String serviceTypesConfigPath, ITransaction transaction)
Register the types of service.void
unregister(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction)
Unregister a service.void
unregisterServiceType(SessionConfig sessionConfig, java.lang.String typeId, ITransaction transaction)
Unregister the service´s type.
-
-
-
Method Detail
-
register
public void register(SessionConfig sessionConfig, java.lang.String serviceConfigPath, ITransaction transaction) throws PortalException
Service- Specified by:
register
in interfaceIServiceManager
- Throws:
ManagerException
PortalException
-
unregister
public void unregister(SessionConfig sessionConfig, java.lang.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, java.lang.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, java.lang.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 java.util.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, java.lang.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, java.lang.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, java.lang.String serviceType, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
getPreBuiltChannelFiles
public java.util.Collection<java.lang.String> getPreBuiltChannelFiles(SessionConfig sessionConfig, java.lang.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, java.lang.Object configKey, java.lang.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
-
-