Package lumis.portal.serviceinstance
Interface IServiceInstanceManager
-
- All Superinterfaces:
IConfigDeleter
,IConfigKeyChecker
- All Known Subinterfaces:
IServiceInstanceManagerSPI
- All Known Implementing Classes:
ServiceInstanceManager
@StableMinor(version="17.0", sinceVersion="4.0") public interface IServiceInstanceManager extends IConfigDeleter, IConfigKeyChecker
Manager Interface for Service Instance operations- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction)
java.lang.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, java.lang.String serviceInstanceId, ITransaction transaction)
Remove the object cache entries for the specificed Service Instance also clearing it's ACL cache.void
delete(SessionConfig sessionConfig, java.lang.String serviceInstanceId, boolean force, ITransaction transaction)
Delete a service instance.void
deleteCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Deletes all service instance´s custom propertiesvoid
deleteCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, ITransaction transaction)
Deletes a service instance custom propertyjava.lang.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceNode, ITransaction transaction)
void
deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceCustomPropertiesNode, ITransaction transaction)
Deprecated.Since 6.2.0 this method is no longer used and may be removed in a future version.java.lang.String
deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceDependencyNode, ITransaction transaction)
Deserializes the given dependencyServiceInstanceConfig
findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, java.lang.String channelId, java.lang.String serviceId, ITransaction transaction)
Searches for a service instanceServiceInstanceConfig
get(java.lang.String serviceInstanceId, ITransaction transaction)
Get the configuration of the service instance.java.util.Map<java.lang.String,java.lang.String>
getCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Gets all the custom properties of a specified service instance.java.lang.String
getCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, ITransaction transaction)
Returns the specified custom property.ServiceInstanceDependencyConfig
getDependency(java.lang.String serviceInstanceDependencyId, ITransaction transaction)
java.util.Collection<java.lang.String>
getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Returns the service instance ids that the given service instance id depends onjava.util.Collection<java.lang.String>
getDependentServiceInstanceIds(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
java.util.Collection<ServiceInstanceConfig>
getDependentServiceInstances(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Returns the service instances that are dependent on the specified service instance.java.util.Collection<java.lang.String>
getIds(SessionConfig sessionConfig, ITransaction transaction)
Get the ids of all services instancesjava.util.Collection<java.lang.String>
getIdsByChannelId(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get the ids of the services instances by passing the channel id.java.util.Collection<java.lang.String>
getIdsByChannelTree(SessionConfig sessionConfig, java.lang.String rootChannelId, ITransaction transaction)
Get the ids of the services instances of all the channel tree by passing the tree's root channel id.java.util.Collection<java.lang.String>
getIdsByChannelTreeAndAreaTags(SessionConfig sessionConfig, java.lang.String rootChannelId, java.util.Collection<java.lang.String> areaTags, ITransaction transaction)
Returns the identifiers of services instances that belong to the channel tree inside the specified root channel, and contains any of the specified area tags.java.util.Collection<java.lang.String>
getIdsByServiceId(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction)
Get the ids of the services instances by passing the service id.ServiceInstanceConfig
getServiceInstanceByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction)
Get the service instance the given service instance depends on by the given dependency type.java.util.Collection<ServiceInstanceConfig>
getServiceInstancesByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction)
Returns the service instances the given service instance depends on by the given dependency type.void
serialize(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
void
serializeCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
Serializes the custom properties of a service instance into the specified outputstream.void
serializeDependencies(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
Serializes the dependencies of a service instancevoid
setCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.util.Map<java.lang.String,java.lang.String> propertiesTable, ITransaction transaction)
Receives a Map with one or more properties to be set for the given service instance.void
setCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, java.lang.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(java.lang.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, java.lang.String channelId, java.lang.String serviceId, ITransaction transaction) throws PortalException
Searches for a service instance- Parameters:
sessionConfig
-channelId
-serviceId
-transaction
-- Returns:
- Throws:
PortalException
-
add
java.lang.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, java.lang.String serviceInstanceId, boolean force, ITransaction transaction) throws ManagerException, PortalException
Delete a service instance.- Parameters:
sessionConfig
-serviceInstanceId
-force
- TODOtransaction
-- Throws:
ManagerException
PortalException
-
getIds
java.util.Collection<java.lang.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
java.util.Collection<java.lang.String> getIdsByChannelId(SessionConfig sessionConfig, java.lang.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
java.util.Collection<java.lang.String> getIdsByChannelTree(SessionConfig sessionConfig, java.lang.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
-
getIdsByChannelTreeAndAreaTags
java.util.Collection<java.lang.String> getIdsByChannelTreeAndAreaTags(SessionConfig sessionConfig, java.lang.String rootChannelId, java.util.Collection<java.lang.String> areaTags, ITransaction transaction) throws PortalException
Returns the identifiers of services instances that belong to the channel tree inside the specified root channel, and contains any of the specified area tags.- Parameters:
sessionConfig
- user session information.rootChannelId
- the channel that is root of the channel tree where the service instances are searched on.areaTags
- the service instance must have one of the specified area tags to be returned. If this argument isnull
, it is ignored and the service instances will not be filtered by area tags. If this argument is an empty collection, an empty collection will be returned.transaction
- the transaction for persistence access.- Returns:
- collection with identifiers of service instances found.
- Throws:
PortalException
-
getIdsByServiceId
java.util.Collection<java.lang.String> getIdsByServiceId(SessionConfig sessionConfig, java.lang.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, java.lang.String serviceInstanceId, java.lang.String name, java.lang.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. If the property value is null or empty the property is removed.- Parameters:
sessionConfig
- the user session information.serviceInstanceId
- the id of the service instance.name
- the property name.value
- the property value.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
getCustomProperty
java.lang.String getCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.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, java.lang.String serviceInstanceId, java.lang.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, java.lang.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, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-serviceInstanceId
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserialize
java.lang.String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceNode, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-deserializationConfig
-serviceInstanceNode
-transaction
-- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
getServiceInstanceByDependency
ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction) throws ManagerException, PortalException
Get the service instance the given service instance depends on by the given dependency type.If the service instance depends on multiple service instances, any may be returned. Use
getServiceInstancesByDependency(SessionConfig, String, String, ITransaction)
to get all of them.- Parameters:
sessionConfig
- current session informationserviceInstanceId
- 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:
PortalException
ManagerException
-
getServiceInstancesByDependency
java.util.Collection<ServiceInstanceConfig> getServiceInstancesByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction) throws PortalException
Returns the service instances the given service instance depends on by the given dependency type.- Parameters:
sessionConfig
- current session informationserviceInstanceId
- the id of the service instance that depends on the returned service instances.dependencyType
- the type of dependency.transaction
- the transaction for persistence access.- Returns:
- the service instances the given service instance depends on, or an empty collection if none was found.
- Throws:
PortalException
- if the service instances could not be obtained.- Since:
- 6.2.0
- See Also:
getServiceInstanceByDependency(SessionConfig, String, String, ITransaction)
-
setServiceInstanceDependency
void setServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig, ITransaction transaction) throws PortalException
Sets the given service instance dependency. Any existing dependency from the same service instance of the same type is removed.- Parameters:
serviceInstanceDependencyConfig
- the information about the dependency to be set.transaction
- the transaction for persistence access.- Throws:
PortalException
-
serializeDependencies
void serializeDependencies(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws PortalException
Serializes the dependencies of a service instance- Parameters:
sessionConfig
-serviceInstanceId
-outputStream
-transaction
-- Throws:
PortalException
-
getDependencyIdsByServiceInstanceId
java.util.Collection<java.lang.String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.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
java.util.Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig, java.lang.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
java.lang.String deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceDependencyNode, ITransaction transaction) throws PortalException
Deserializes the given dependency- Parameters:
sessionConfig
-deserializationConfig
-serviceInstanceDependencyNode
-transaction
-- Returns:
- Throws:
PortalException
-
getCustomProperties
java.util.Map<java.lang.String,java.lang.String> getCustomProperties(SessionConfig sessionConfig, java.lang.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, java.lang.String serviceInstanceId, java.io.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
@Deprecated void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceCustomPropertiesNode, ITransaction transaction) throws ManagerException, PortalException
Deprecated.Since 6.2.0 this method is no longer used and may be removed in a future version.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, java.lang.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(java.lang.String serviceInstanceDependencyId, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
getDependentServiceInstanceIds
java.util.Collection<java.lang.String> getDependentServiceInstanceIds(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
setCustomProperties
void setCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.util.Map<java.lang.String,java.lang.String> propertiesTable, ITransaction transaction) throws ManagerException, PortalException
Receives a Map with one or more properties to be set 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 interface instance. If the property value is null or empty the property is removed.- Parameters:
sessionConfig
- the user session information.serviceInstanceId
- the id of the service instance.propertiesTable
- the<key, value>
property map.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
- Since:
- 4.0.3
-
addOrUpdate
void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
add
java.lang.String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
-