|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.serviceinstance.ServiceInstanceManager
public class ServiceInstanceManager
Service instance manager implementation.
Constructor Summary | |
---|---|
ServiceInstanceManager()
|
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 |
clearServiceInstanceMemoryCache(String serviceInstanceId,
ITransaction transaction)
Clears the service instance information cached in this manager. |
void |
delete(SessionConfig sessionConfig,
String serviceInstanceId,
boolean force,
ITransaction transaction)
Delete a service instance. |
void |
deleteConfig(DeserializationContext deserializationContext,
String configId)
|
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. |
boolean |
keyExists(SessionConfig sessionConfig,
Object configKey,
Object config,
ITransaction transaction)
Checks if configId matches an already persisted object |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceInstanceManager()
Method Detail |
---|
public void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
addOrUpdate
in interface IServiceInstanceManager
ManagerException
PortalException
public ServiceInstanceConfig get(String serviceInstanceId, ITransaction transaction) throws PortalException
IServiceInstanceManager
get
in interface IServiceInstanceManager
ManagerException
PortalException
public ServiceInstanceDependencyConfig getDependency(String serviceInstanceDependencyId, ITransaction transaction) throws PortalException
getDependency
in interface IServiceInstanceManager
PortalException
public ServiceInstanceConfig findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, String channelId, String serviceId, ITransaction transaction) throws PortalException
IServiceInstanceManager
findServiceInstanceThroughChannelTree
in interface IServiceInstanceManager
PortalException
public String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws PortalException
IServiceInstanceManager
add
in interface IServiceInstanceManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws PortalException
IServiceInstanceManager
update
in interface IServiceInstanceManager
ManagerException
PortalException
public void delete(SessionConfig sessionConfig, String serviceInstanceId, boolean force, ITransaction transaction) throws PortalException
IServiceInstanceManager
delete
in interface IServiceInstanceManager
force
- TODO
ManagerException
PortalException
public Collection<String> getIds(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IServiceInstanceManager
getIds
in interface IServiceInstanceManager
ManagerException
PortalException
public Collection<String> getIdsByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
IServiceInstanceManager
getIdsByChannelId
in interface IServiceInstanceManager
ManagerException
PortalException
public Collection<String> getIdsByChannelTree(SessionConfig sessionConfig, String rootChannelId, ITransaction transaction) throws PortalException
IServiceInstanceManager
getIdsByChannelTree
in interface IServiceInstanceManager
ManagerException
PortalException
public Collection<String> getIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws PortalException
IServiceInstanceManager
getIdsByServiceId
in interface IServiceInstanceManager
ManagerException
PortalException
public String getCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, ITransaction transaction) throws PortalException
IServiceInstanceManager
getCustomProperty
in interface IServiceInstanceManager
ManagerException
PortalException
public void setCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, String value, ITransaction transaction) throws PortalException
IServiceInstanceManager
setCustomProperty
in interface IServiceInstanceManager
ManagerException
PortalException
public void setCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, Map<String,String> propertiesTable, ITransaction transaction) throws ManagerException, PortalException
setCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
public void deleteCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, ITransaction transaction) throws PortalException
IServiceInstanceManager
deleteCustomProperty
in interface IServiceInstanceManager
ManagerException
PortalException
public void deleteCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IServiceInstanceManager
deleteCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
public void serialize(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws PortalException
serialize
in interface IServiceInstanceManager
ManagerException
PortalException
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceNode, ITransaction transaction) throws PortalException
deserialize
in interface IServiceInstanceManager
ManagerException
PortalException
public ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig, String serviceInstanceId, String dependencyType, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
getServiceInstanceByDependency
in interface IServiceInstanceManager
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.
ManagerException
PortalException
public void setServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig, ITransaction transaction) throws PortalException
IServiceInstanceManager
setServiceInstanceDependency
in interface IServiceInstanceManager
serviceInstanceDependencyConfig
- the information about the dependency to be set.transaction
- the transaction for persistence access.
PortalException
public void serializeDependencies(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws PortalException
IServiceInstanceManager
serializeDependencies
in interface IServiceInstanceManager
PortalException
public Collection<String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
getDependencyIdsByServiceInstanceId
in interface IServiceInstanceManager
ManagerException
PortalException
public Collection<String> getDependentServiceInstanceIds(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
getDependentServiceInstanceIds
in interface IServiceInstanceManager
PortalException
public Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IServiceInstanceManager
getDependentServiceInstances
in interface IServiceInstanceManager
sessionConfig
- the user session information.serviceInstanceId
- the id of the service instance the returned service instances depend on.transaction
- the transaction for persistence access.
PortalException
public String deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceDependencyNode, ITransaction transaction) throws PortalException
IServiceInstanceManager
deserializeDependency
in interface IServiceInstanceManager
PortalException
public Map<String,String> getCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
getCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
public void serializeCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
serializeCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
public void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceCustomPropertiesNode, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
deserializeCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
public void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws ManagerException, PortalException
addOrUpdate
in interface IServiceInstanceManager
ManagerException
PortalException
public String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws PortalException
add
in interface IServiceInstanceManager
PortalException
public void clearServiceInstanceCache(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
clearServiceInstanceCache
in interface IServiceInstanceManager
ManagerException
PortalException
public void clearServiceInstanceMemoryCache(String serviceInstanceId, ITransaction transaction) throws PortalException
ChannelManager
.
serviceInstanceId
- the service instance identifier.transaction
- the transaction for persistence access.
PortalException
public void deleteConfig(DeserializationContext deserializationContext, String configId) throws PortalException
deleteConfig
in interface IConfigDeleter
PortalException
public boolean keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
IConfigKeyChecker
keyExists
in interface IConfigKeyChecker
config
- Optional, allows a checker to read aditional fields to check composed keys
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |