lumis.portal.service
Class ServiceManager

Package class diagram package ServiceManager
java.lang.Object
  extended by 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

Constructor Summary
ServiceManager()
           
 
Method Summary
 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 object
 void register(SessionConfig sessionConfig, String serviceConfigPath, ITransaction transaction)
          Service
 void 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceManager

public ServiceManager()
Method Detail

register

public void register(SessionConfig sessionConfig,
                     String serviceConfigPath,
                     ITransaction transaction)
              throws ManagerException,
                     PortalException
Service

Specified by:
register in interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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 interface IServiceManager
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
See Also:
PortalContext#getDefinitionPath(String)}

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 interface IServiceManager
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 interface IConfigKeyChecker
config - Optional, allows a checker to read aditional fields to check composed keys
Returns:
true if configId matches an already persisted object


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.