|
||||||||||
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)
Deprecated. |
String |
deserializeDependency(SessionConfig sessionConfig,
DeserializationConfig deserializationConfig,
Node serviceInstanceDependencyNode,
ITransaction transaction)
Deserializes the given dependency |
boolean |
existsRestShortName(String restShortName,
String serviceInstanceIdToIgnore,
ITransaction transaction)
Verify if a given name exists. |
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. |
ServiceInstanceConfig |
getByRestShortName(String restShortName,
ITransaction transaction)
Get the service's instance by rest short name. |
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<FileTransformation> |
getFileTransformations(String serviceInstanceId)
Gets all fileTransformations using an serviceInstance´s id.. |
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. |
Collection<ServiceInstanceConfig> |
getServiceInstancesByDependency(SessionConfig sessionConfig,
String serviceInstanceId,
String dependencyType,
ITransaction transaction)
Returns the service instances 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 |
serializeFileTransformations(SessionConfig sessionConfig,
String serviceInstanceId,
OutputStream outputStream,
ITransaction transaction)
serialize a fileTransformation to be used in a new channel created from channel template. |
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 boolean existsRestShortName(String restShortName, String serviceInstanceIdToIgnore, ITransaction transaction) throws PortalException
IServiceInstanceManagerSPI
existsRestShortName
in interface IServiceInstanceManagerSPI
restShortName
- rest short name of the service instance.serviceInstanceIdToIgnore
- service instance id that will
not include on the search.transaction
- transaction used to perform the query.
PortalException
- if any other error occurs during the process.public ServiceInstanceConfig getByRestShortName(String restShortName, ITransaction transaction) throws PortalException
IServiceInstanceManagerSPI
getByRestShortName
in interface IServiceInstanceManagerSPI
restShortName
- rest short name of the service instance.transaction
- transaction used to perform the query.
PortalException
- if any other error occurs during the process.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
If the service instance depends on multiple service instances, any may
be returned. Use IServiceInstanceManager.getServiceInstancesByDependency(SessionConfig, String, String, ITransaction)
to get all of them.
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.
PortalException
ManagerException
#getServiceInstancesByDependency(SessionConfig, String, String, ITransaction)}
public Collection<ServiceInstanceConfig> getServiceInstancesByDependency(SessionConfig sessionConfig, String serviceInstanceId, String dependencyType, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
getServiceInstancesByDependency
in interface IServiceInstanceManager
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.
PortalException
- if the service instances could not be obtained.
ManagerException
IServiceInstanceManager.getServiceInstanceByDependency(SessionConfig, String, String, ITransaction)
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 Collection<FileTransformation> getFileTransformations(String serviceInstanceId) throws PortalException
serviceInstanceId
- serviceInstance´s id.
PortalException
- if an error occurs during the process.public void serializeCustomProperties(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManager
serializeCustomProperties
in interface IServiceInstanceManager
ManagerException
PortalException
@Deprecated 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
public void serializeFileTransformations(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceManagerSPI
serializeFileTransformations
in interface IServiceInstanceManagerSPI
sessionConfig
- user session information.serviceInstanceId
- new serviceInstance´s idoutputStream
- the outputstream to serialize the data to.transaction
- transaction used to perform the query.
ManagerException
- if an error occurs during the process
PortalException
- if an error occurs during the process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |