lumis.portal.serviceinstance
Interface IServiceInstanceManager

Package class diagram package IServiceInstanceManager
All Superinterfaces:
IConfigDeleter, IConfigKeyChecker
All Known Implementing Classes:
ServiceInstanceManager

@StableMinor(version="5.5",
             sinceVersion="4.0")
public interface IServiceInstanceManager
extends IConfigDeleter, IConfigKeyChecker

Manager Interface for Service Instance operations

Since:
4.0.0

Method Summary
 String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction)
           
 String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
          Add a service instance.
 void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction)
           
 void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
          Add or Update a Service Instance, depending on its previous existence.
 void clearServiceInstanceCache(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
          Remove the object cache entries for the specificed Service Instance also clearing it's ACL cache.
 void delete(SessionConfig sessionConfig, String serviceInstanceId, boolean force, ITransaction transaction)
          Delete a service instance.
 void deleteCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
          Deletes all service instance´s custom properties
 void deleteCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, ITransaction transaction)
          Deletes a service instance custom property
 String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceNode, ITransaction transaction)
           
 void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceCustomPropertiesNode, ITransaction transaction)
          Deserialize custom properties from a XML node into a service instance.
 String deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceDependencyNode, ITransaction transaction)
          Deserializes the given dependency
 ServiceInstanceConfig findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, String channelId, String serviceId, ITransaction transaction)
          Searches for a service instance
 ServiceInstanceConfig get(String serviceInstanceId, ITransaction transaction)
          Get the configuration of the service instance.
 Map<String,String> getCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
          Gets all the custom properties of a specified service instance.
 String getCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, ITransaction transaction)
          Returns the specified custom property.
 ServiceInstanceDependencyConfig getDependency(String serviceInstanceDependencyId, ITransaction transaction)
           
 Collection<String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
          Returns the service instance ids that the given service instance id depends on
 Collection<String> getDependentServiceInstanceIds(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
           
 Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
          Returns the service instances that are dependent on the specified service instance.
 Collection<String> getIds(SessionConfig sessionConfig, ITransaction transaction)
          Get the ids of all services instances
 Collection<String> getIdsByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
          Get the ids of the services instances by passing the channel id.
 Collection<String> getIdsByChannelTree(SessionConfig sessionConfig, String rootChannelId, ITransaction transaction)
          Get the ids of the services instances of all the channel tree by passing the tree's root channel id.
 Collection<String> getIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
          Get the ids of the services instances by passing the service id.
 ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig, String serviceInstanceId, String dependencyType, ITransaction transaction)
          Get the service instance the given service instance depends on by the given dependency type.
 void serialize(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction)
           
 void serializeCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction)
          Serializes the custom properties of a service instance into the specified outputstream.
 void serializeDependencies(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction)
          Serializes the dependencies of a service instance
 void setCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, Map<String,String> propertiesTable, ITransaction transaction)
           
 void setCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, String value, ITransaction transaction)
          Set a custom property for the given service instance.
 void setServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig, ITransaction transaction)
          Sets the given service instance dependency.
 void update(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
          Update a service instance.
 
Methods inherited from interface lumis.portal.serialization.operation.IConfigDeleter
deleteConfig
 
Methods inherited from interface lumis.portal.serialization.operation.IConfigKeyChecker
keyExists
 

Method Detail

addOrUpdate

void addOrUpdate(SessionConfig sessionConfig,
                 ServiceInstanceConfig serviceInstanceConfig,
                 ITransaction transaction)
                 throws ManagerException,
                        PortalException
Add or Update a Service Instance, depending on its previous existence.

Parameters:
sessionConfig -
serviceInstanceConfig -
transaction -
Throws:
ManagerException
PortalException

get

ServiceInstanceConfig get(String serviceInstanceId,
                          ITransaction transaction)
                          throws ManagerException,
                                 PortalException
Get the configuration of the service instance.

Parameters:
serviceInstanceId -
transaction -
Returns:
a ServiceInstanceConfig.
Throws:
ManagerException
PortalException

findServiceInstanceThroughChannelTree

ServiceInstanceConfig findServiceInstanceThroughChannelTree(SessionConfig sessionConfig,
                                                            String channelId,
                                                            String serviceId,
                                                            ITransaction transaction)
                                                            throws PortalException
Searches for a service instance

Parameters:
sessionConfig -
channelId -
serviceId -
transaction -
Returns:
Throws:
PortalException

add

String add(SessionConfig sessionConfig,
           ServiceInstanceConfig serviceInstanceConfig,
           ITransaction transaction)
           throws ManagerException,
                  PortalException
Add a service instance. The isInstantiable attribute of the associated serviceConfig is simply an informative attribute. This is used by the front end. However if one calls the ServiceManager.add method the isInstantiable attribute will be ignored.

Parameters:
sessionConfig -
serviceInstanceConfig -
transaction -
Returns:
a String.
Throws:
ManagerException
PortalException

update

void update(SessionConfig sessionConfig,
            ServiceInstanceConfig serviceInstanceConfig,
            ITransaction transaction)
            throws ManagerException,
                   PortalException
Update a service instance.

Parameters:
sessionConfig -
serviceInstanceConfig -
transaction -
Throws:
ManagerException
PortalException

delete

void delete(SessionConfig sessionConfig,
            String serviceInstanceId,
            boolean force,
            ITransaction transaction)
            throws ManagerException,
                   PortalException
Delete a service instance.

Parameters:
sessionConfig -
serviceInstanceId -
force - TODO
transaction -
Throws:
ManagerException
PortalException

getIds

Collection<String> getIds(SessionConfig sessionConfig,
                          ITransaction transaction)
                          throws ManagerException,
                                 PortalException
Get the ids of all services instances

Parameters:
sessionConfig -
channelId -
transaction -
Returns:
a array of Strings.
Throws:
ManagerException
PortalException

getIdsByChannelId

Collection<String> getIdsByChannelId(SessionConfig sessionConfig,
                                     String channelId,
                                     ITransaction transaction)
                                     throws ManagerException,
                                            PortalException
Get the ids of the services instances by passing the channel id.

Parameters:
sessionConfig -
channelId -
transaction -
Returns:
a array of Strings.
Throws:
ManagerException
PortalException

getIdsByChannelTree

Collection<String> getIdsByChannelTree(SessionConfig sessionConfig,
                                       String rootChannelId,
                                       ITransaction transaction)
                                       throws ManagerException,
                                              PortalException
Get the ids of the services instances of all the channel tree by passing the tree's root channel id.

Parameters:
sessionConfig -
rootChannelId -
transaction -
Returns:
a array of Strings.
Throws:
ManagerException
PortalException

getIdsByServiceId

Collection<String> getIdsByServiceId(SessionConfig sessionConfig,
                                     String serviceId,
                                     ITransaction transaction)
                                     throws ManagerException,
                                            PortalException
Get the ids of the services instances by passing the service id.

Parameters:
sessionConfig -
serviceId -
transaction -
Returns:
a array of Strings.
Throws:
ManagerException
PortalException

setCustomProperty

void setCustomProperty(SessionConfig sessionConfig,
                       String serviceInstanceId,
                       String name,
                       String value,
                       ITransaction transaction)
                       throws ManagerException,
                              PortalException
Set a custom property for the given service instance. If the property has been previously set, this method replaces the previous value, else a new property is created for the service instance.

Parameters:
sessionConfig -
serviceInstanceId -
name -
value -
transaction -
Throws:
ManagerException
PortalException

getCustomProperty

String getCustomProperty(SessionConfig sessionConfig,
                         String serviceInstanceId,
                         String name,
                         ITransaction transaction)
                         throws ManagerException,
                                PortalException
Returns the specified custom property. If the property has not been set earlier, null is returned.

Parameters:
sessionConfig -
serviceInstanceId -
name -
transaction -
Returns:
a String.
Throws:
ManagerException
PortalException

deleteCustomProperty

void deleteCustomProperty(SessionConfig sessionConfig,
                          String serviceInstanceId,
                          String name,
                          ITransaction transaction)
                          throws ManagerException,
                                 PortalException
Deletes a service instance custom property

Parameters:
sessionConfig -
serviceInstanceId -
name -
transaction -
Throws:
ManagerException
PortalException

deleteCustomProperties

void deleteCustomProperties(SessionConfig sessionConfig,
                            String serviceInstanceId,
                            ITransaction transaction)
                            throws ManagerException,
                                   PortalException
Deletes all service instance´s custom properties

Parameters:
sessionConfig -
serviceInstanceId -
transaction -
Throws:
ManagerException
PortalException

serialize

void serialize(SessionConfig sessionConfig,
               String serviceInstanceId,
               OutputStream outputStream,
               ITransaction transaction)
               throws ManagerException,
                      PortalException
Parameters:
sessionConfig -
serviceInstanceId -
outputStream -
transaction -
Throws:
ManagerException
PortalException

deserialize

String deserialize(SessionConfig sessionConfig,
                   DeserializationConfig deserializationConfig,
                   Node serviceInstanceNode,
                   ITransaction transaction)
                   throws ManagerException,
                          PortalException
Parameters:
sessionConfig -
deserializationConfig -
serviceInstanceNode -
transaction -
Returns:
Returns a String.
Throws:
ManagerException
PortalException

getServiceInstanceByDependency

ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig,
                                                     String serviceInstanceId,
                                                     String dependencyType,
                                                     ITransaction transaction)
                                                     throws ManagerException,
                                                            PortalException
Get the service instance the given service instance depends on by the given dependency type.

Parameters:
sessionConfig - current session information
serviceInstanceId - the id of the service instance that depends on the returned service instance.
dependencyType - the type of dependency.
transaction - the transaction for persistence access.
Returns:
the service instance the given service instance depends on, or null if none was found.
Throws:
ManagerException
PortalException

setServiceInstanceDependency

void setServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig,
                                  ITransaction transaction)
                                  throws PortalException
Sets the given service instance dependency. Any dependency from the same service instance of the same type is replaced.

Parameters:
serviceInstanceDependencyConfig - the information about the dependency to be set.
transaction - the transaction for persistence access.
Throws:
PortalException

serializeDependencies

void serializeDependencies(SessionConfig sessionConfig,
                           String serviceInstanceId,
                           OutputStream outputStream,
                           ITransaction transaction)
                           throws PortalException
Serializes the dependencies of a service instance

Parameters:
sessionConfig -
serviceInstanceId -
outputStream -
transaction -
Throws:
PortalException

getDependencyIdsByServiceInstanceId

Collection<String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig,
                                                       String serviceInstanceId,
                                                       ITransaction transaction)
                                                       throws ManagerException,
                                                              PortalException
Returns the service instance ids that the given service instance id depends on

Parameters:
sessionConfig -
serviceInstanceId -
transaction -
Returns:
Throws:
ManagerException
PortalException

getDependentServiceInstances

Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig,
                                                               String serviceInstanceId,
                                                               ITransaction transaction)
                                                               throws PortalException
Returns the service instances that are dependent on the specified service instance.

Parameters:
sessionConfig - the user session information.
serviceInstanceId - the id of the service instance the returned service instances depend on.
transaction - the transaction for persistence access.
Returns:
a collection with the service instances found.
Throws:
PortalException

deserializeDependency

String deserializeDependency(SessionConfig sessionConfig,
                             DeserializationConfig deserializationConfig,
                             Node serviceInstanceDependencyNode,
                             ITransaction transaction)
                             throws PortalException
Deserializes the given dependency

Parameters:
sessionConfig -
deserializationConfig -
serviceInstanceDependencyNode -
transaction -
Returns:
Throws:
PortalException

getCustomProperties

Map<String,String> getCustomProperties(SessionConfig sessionConfig,
                                       String serviceInstanceId,
                                       ITransaction transaction)
                                       throws ManagerException,
                                              PortalException
Gets all the custom properties of a specified service instance. The method will return a Hashmap containing all properties names and values of a service instance by it's serviceInstanceId.

Parameters:
sessionConfig -
serviceInstanceId -
transaction -
Returns:
Throws:
ManagerException
PortalException
Since:
4.0.3

serializeCustomProperties

void serializeCustomProperties(SessionConfig sessionConfig,
                               String serviceInstanceId,
                               OutputStream outputStream,
                               ITransaction transaction)
                               throws ManagerException,
                                      PortalException
Serializes the custom properties of a service instance into the specified outputstream.

Parameters:
sessionConfig -
serviceInstanceId -
outputStream -
transaction -
Throws:
ManagerException
PortalException
Since:
4.0.3

deserializeCustomProperties

void deserializeCustomProperties(SessionConfig sessionConfig,
                                 DeserializationConfig deserializationConfig,
                                 Node serviceInstanceCustomPropertiesNode,
                                 ITransaction transaction)
                                 throws ManagerException,
                                        PortalException
Deserialize custom properties from a XML node into a service instance. The properties name and values will be read from the serviceInstanceCustomPropertiesNode and will follow the constraints stored on the DeserializationConfig. The expected scheme of the serviceInstanceCustomPropertiesNode is the same used by the {@link serializeCustomProperties) method.

Parameters:
sessionConfig -
deserializationConfig -
serviceInstanceCustomPropertiesNode -
transaction -
Throws:
ManagerException
PortalException
Since:
4.0.3

clearServiceInstanceCache

void clearServiceInstanceCache(SessionConfig sessionConfig,
                               String serviceInstanceId,
                               ITransaction transaction)
                               throws ManagerException,
                                      PortalException
Remove the object cache entries for the specificed Service Instance also clearing it's ACL cache.

Parameters:
sessionConfig -
serviceInstanceId -
transaction -
Throws:
ManagerException
PortalException
Since:
4.0.4

getDependency

ServiceInstanceDependencyConfig getDependency(String serviceInstanceDependencyId,
                                              ITransaction transaction)
                                              throws PortalException
Throws:
PortalException

getDependentServiceInstanceIds

Collection<String> getDependentServiceInstanceIds(SessionConfig sessionConfig,
                                                  String serviceInstanceId,
                                                  ITransaction transaction)
                                                  throws PortalException
Throws:
PortalException

setCustomProperties

void setCustomProperties(SessionConfig sessionConfig,
                         String serviceInstanceId,
                         Map<String,String> propertiesTable,
                         ITransaction transaction)
                         throws ManagerException,
                                PortalException
Throws:
ManagerException
PortalException

addOrUpdate

void addOrUpdate(SessionConfig sessionConfig,
                 ServiceInstanceConfig serviceInstanceConfig,
                 boolean fromDeserialization,
                 ITransaction transaction)
                 throws ManagerException,
                        PortalException
Throws:
ManagerException
PortalException

add

String add(SessionConfig sessionConfig,
           ServiceInstanceConfig serviceInstanceConfig,
           boolean fromDeserialization,
           ITransaction transaction)
           throws PortalException
Throws:
PortalException


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