Package lumis.portal.serviceinstance
Class ServiceInstanceManager
- java.lang.Object
-
- lumis.portal.serviceinstance.ServiceInstanceManager
-
- All Implemented Interfaces:
IConfigDeleter
,IConfigKeyChecker
,IServiceInstanceManager
,IServiceInstanceManagerSPI
public class ServiceInstanceManager extends java.lang.Object implements IServiceInstanceManagerSPI
Service instance manager implementation.- Since:
- 4.0.0
- Version:
- $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELETED_SERVICE_INSTANCES_TRANSACTION_ATTRIBUTE_NAME
-
Constructor Summary
Constructors Constructor Description ServiceInstanceManager()
-
Method Summary
All Methods Instance Methods Concrete 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
clearAppropriateAutoAdministrationsPerPageIdCache(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
Clears the entry in the cacheAutoAdministrationPageIds cache if the service config is an instance of a an auto-administration service.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
clearServiceInstanceMemoryCache(java.lang.String serviceInstanceId, ITransaction transaction)
Clears the service instance information cached in this manager.void
delete(SessionConfig sessionConfig, java.lang.String serviceInstanceId, boolean force, ITransaction transaction)
Delete a service instance.void
deleteConfig(DeserializationContext deserializationContext, java.lang.String configId)
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.java.lang.String
deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceDependencyNode, ITransaction transaction)
Deserializes the given dependencyboolean
existsRestShortName(java.lang.String restShortName, java.lang.String serviceInstanceIdToIgnore, java.lang.String parentChannelId, ITransaction transaction)
Verify if a given name exists.ServiceInstanceConfig
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.ServiceInstanceConfig
getByRestShortName(java.lang.String restShortName, ITransaction transaction)
Get the service's instance by rest short name.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<FileTransformation>
getFileTransformations(java.lang.String serviceInstanceId)
Gets all fileTransformations using an serviceInstance´s id..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.java.lang.String
getMenuXml(java.lang.String serviceInstanceId)
Returns the configuration menu in XML for a service instance.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.java.util.Collection<ServiceInstanceConfig>
getServiceInstancesByServiceAndWebsite(java.lang.String serviceId, java.lang.String websiteId)
Returns all instances of a given service inside a given website.java.util.Collection<java.lang.String>
getServiceInstancesIdsByAutoAdminPageId(java.lang.String pageId, ITransaction transaction)
Returns the service instance ids that use the indicated page id as the auto administration page.boolean
keyExists(SessionConfig sessionConfig, java.lang.Object configKey, java.lang.Object config, ITransaction transaction)
Checks if configId matches an already persisted objectvoid
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
serializeFileTransformations(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
serialize a fileTransformation to be used in a new channel created from channel template.void
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.void
validateDuplicateInstanceInChannel(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
Validates that there are no duplicates of a service instance in the same channel.
-
-
-
Method Detail
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
Add or Update a Service Instance, depending on its previous existence.- Specified by:
addOrUpdate
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
get
public ServiceInstanceConfig get(java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Get the configuration of the service instance.- Specified by:
get
in interfaceIServiceInstanceManager
- Returns:
- a ServiceInstanceConfig.
- Throws:
ManagerException
PortalException
-
existsRestShortName
public boolean existsRestShortName(java.lang.String restShortName, java.lang.String serviceInstanceIdToIgnore, java.lang.String parentChannelId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Verify if a given name exists.- Specified by:
existsRestShortName
in interfaceIServiceInstanceManagerSPI
- Parameters:
restShortName
- rest short name of the service instance.serviceInstanceIdToIgnore
- service instance id that will not include on the search.parentChannelId
- the channelId of in which the service instance is/(will be) persistedtransaction
- transaction used to perform the query.- Returns:
- true if the name exists otherwise false.
- Throws:
PortalException
- if any other error occurs during the process.
-
getByRestShortName
public ServiceInstanceConfig getByRestShortName(java.lang.String restShortName, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Get the service's instance by rest short name. This will only return valid rest service instances(i.e. instances in a template channel will be ignored).- Specified by:
getByRestShortName
in interfaceIServiceInstanceManagerSPI
- Parameters:
restShortName
- rest short name of the service instance.transaction
- transaction used to perform the query.- Returns:
- the serviceInstanceConfig that represents the service instance.
- Throws:
PortalException
- if any other error occurs during the process.
-
getDependency
public ServiceInstanceDependencyConfig getDependency(java.lang.String serviceInstanceDependencyId, ITransaction transaction) throws PortalException
- Specified by:
getDependency
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
findServiceInstanceThroughChannelTree
public ServiceInstanceConfig findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, java.lang.String channelId, java.lang.String serviceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Searches for a service instance- Specified by:
findServiceInstanceThroughChannelTree
in interfaceIServiceInstanceManager
- Returns:
- Throws:
PortalException
-
add
public java.lang.String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
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.- Specified by:
add
in interfaceIServiceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
update
public void update(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Update a service instance.- Specified by:
update
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
validateDuplicateInstanceInChannel
public void validateDuplicateInstanceInChannel(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ServiceInstanceDuplicatedInChannelException, PortalException
Validates that there are no duplicates of a service instance in the same channel.- Parameters:
serviceInstanceConfig
- that should be verified if already exists in the target channel.transaction
- in which the method should be part of.- Throws:
ServiceInstanceDuplicatedInChannelException
- if the service has been duplicated in the current channel.PortalException
- Since:
- 7.0.0
-
clearAppropriateAutoAdministrationsPerPageIdCache
public final void clearAppropriateAutoAdministrationsPerPageIdCache(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Clears the entry in the cacheAutoAdministrationPageIds cache if the service config is an instance of a an auto-administration service.- Specified by:
clearAppropriateAutoAdministrationsPerPageIdCache
in interfaceIServiceInstanceManagerSPI
- Parameters:
serviceInstanceConfig
- service instance to be evaluated.transaction
- under which the method should happen.- Throws:
PortalException
-
delete
public void delete(SessionConfig sessionConfig, java.lang.String serviceInstanceId, boolean force, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Delete a service instance.- Specified by:
delete
in interfaceIServiceInstanceManager
force
- TODO- Throws:
ManagerException
PortalException
-
getIds
public java.util.Collection<java.lang.String> getIds(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Get the ids of all services instances- Specified by:
getIds
in interfaceIServiceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByChannelId
public java.util.Collection<java.lang.String> getIdsByChannelId(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Get the ids of the services instances by passing the channel id.- Specified by:
getIdsByChannelId
in interfaceIServiceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByChannelTree
public java.util.Collection<java.lang.String> getIdsByChannelTree(SessionConfig sessionConfig, java.lang.String rootChannelId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Get the ids of the services instances of all the channel tree by passing the tree's root channel id.- Specified by:
getIdsByChannelTree
in interfaceIServiceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByChannelTreeAndAreaTags
public java.util.Collection<java.lang.String> getIdsByChannelTreeAndAreaTags(SessionConfig sessionConfig, java.lang.String rootChannelId, java.util.Collection<java.lang.String> areaTags, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
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.- Specified by:
getIdsByChannelTreeAndAreaTags
in interfaceIServiceInstanceManager
- 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
public java.util.Collection<java.lang.String> getIdsByServiceId(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Get the ids of the services instances by passing the service id.- Specified by:
getIdsByServiceId
in interfaceIServiceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getCustomProperty
public java.lang.String getCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Returns the specified custom property. If the property has not been set earlier, null is returned.- Specified by:
getCustomProperty
in interfaceIServiceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
setCustomProperty
public void setCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, java.lang.String value, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
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.- Specified by:
setCustomProperty
in interfaceIServiceInstanceManager
- 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
-
setCustomProperties
public void setCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.util.Map<java.lang.String,java.lang.String> propertiesTable, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
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.- Specified by:
setCustomProperties
in interfaceIServiceInstanceManager
- 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
-
deleteCustomProperty
public void deleteCustomProperty(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String name, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Deletes a service instance custom property- Specified by:
deleteCustomProperty
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
deleteCustomProperties
public void deleteCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Deletes all service instance´s custom properties- Specified by:
deleteCustomProperties
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
serialize
public void serialize(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws PortalException
- Specified by:
serialize
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
deserialize
public java.lang.String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceNode, ITransaction transaction) throws PortalException
- Specified by:
deserialize
in interfaceIServiceInstanceManager
- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
getServiceInstanceByDependency
public ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
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
IServiceInstanceManager.getServiceInstancesByDependency(SessionConfig, String, String, ITransaction)
to get all of them.- Specified by:
getServiceInstanceByDependency
in interfaceIServiceInstanceManager
- 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
public java.util.Collection<ServiceInstanceConfig> getServiceInstancesByDependency(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String dependencyType, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
Returns the service instances the given service instance depends on by the given dependency type.- Specified by:
getServiceInstancesByDependency
in interfaceIServiceInstanceManager
- 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.ManagerException
- See Also:
IServiceInstanceManager.getServiceInstanceByDependency(SessionConfig, String, String, ITransaction)
-
setServiceInstanceDependency
public void setServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Sets the given service instance dependency. Any existing dependency from the same service instance of the same type is removed.- Specified by:
setServiceInstanceDependency
in interfaceIServiceInstanceManager
- Parameters:
serviceInstanceDependencyConfig
- the information about the dependency to be set.transaction
- the transaction for persistence access.- Throws:
PortalException
-
serializeDependencies
public void serializeDependencies(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Serializes the dependencies of a service instance- Specified by:
serializeDependencies
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
getDependencyIdsByServiceInstanceId
public java.util.Collection<java.lang.String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
Returns the service instance ids that the given service instance id depends on- Specified by:
getDependencyIdsByServiceInstanceId
in interfaceIServiceInstanceManager
- Returns:
- Throws:
ManagerException
PortalException
-
getDependentServiceInstanceIds
public java.util.Collection<java.lang.String> getDependentServiceInstanceIds(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
- Specified by:
getDependentServiceInstanceIds
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
getDependentServiceInstances
public java.util.Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Returns the service instances that are dependent on the specified service instance.- Specified by:
getDependentServiceInstances
in interfaceIServiceInstanceManager
- 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
public java.lang.String deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceDependencyNode, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInstanceManager
Deserializes the given dependency- Specified by:
deserializeDependency
in interfaceIServiceInstanceManager
- Returns:
- Throws:
PortalException
-
getCustomProperties
public java.util.Map<java.lang.String,java.lang.String> getCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
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.- Specified by:
getCustomProperties
in interfaceIServiceInstanceManager
- Returns:
- Throws:
ManagerException
PortalException
-
getFileTransformations
public java.util.Collection<FileTransformation> getFileTransformations(java.lang.String serviceInstanceId) throws PortalException
Gets all fileTransformations using an serviceInstance´s id..- Parameters:
serviceInstanceId
- serviceInstance´s id.- Returns:
- Returns a list that contains fileTrasnformations or an empety list.
- Throws:
PortalException
- if an error occurs during the process.- Since:
- 6.2.0
-
serializeCustomProperties
public void serializeCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
Serializes the custom properties of a service instance into the specified outputstream.- Specified by:
serializeCustomProperties
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
deserializeCustomProperties
@Deprecated public void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInstanceCustomPropertiesNode, ITransaction transaction) throws ManagerException, PortalException
Deprecated.Description copied from interface:IServiceInstanceManager
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.- Specified by:
deserializeCustomProperties
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
addOrUpdate
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
add
public java.lang.String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, boolean fromDeserialization, ITransaction transaction) throws PortalException
- Specified by:
add
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
clearServiceInstanceCache
public void clearServiceInstanceCache(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManager
Remove the object cache entries for the specificed Service Instance also clearing it's ACL cache.- Specified by:
clearServiceInstanceCache
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
clearServiceInstanceMemoryCache
public void clearServiceInstanceMemoryCache(java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Clears the service instance information cached in this manager. Currently this is an internal method used byChannelManager
.- Parameters:
serviceInstanceId
- the service instance identifier.transaction
- the transaction for persistence access.- Throws:
PortalException
- Since:
- 4.1.0
-
deleteConfig
public void deleteConfig(DeserializationContext deserializationContext, java.lang.String configId) throws PortalException
- Specified by:
deleteConfig
in interfaceIConfigDeleter
- Throws:
PortalException
-
keyExists
public boolean keyExists(SessionConfig sessionConfig, java.lang.Object configKey, java.lang.Object config, ITransaction transaction)
Description copied from interface:IConfigKeyChecker
Checks if configId matches an already persisted object- Specified by:
keyExists
in interfaceIConfigKeyChecker
config
- Optional, allows a checker to read aditional fields to check composed keys- Returns:
- true if configId matches an already persisted object
-
serializeFileTransformations
public void serializeFileTransformations(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManagerSPI
serialize a fileTransformation to be used in a new channel created from channel template.- Specified by:
serializeFileTransformations
in interfaceIServiceInstanceManagerSPI
- Parameters:
sessionConfig
- user session information.serviceInstanceId
- new serviceInstance´s idoutputStream
- the outputstream to serialize the data to.transaction
- transaction used to perform the query.- Throws:
ManagerException
- if an error occurs during the processPortalException
- if an error occurs during the process
-
getServiceInstancesIdsByAutoAdminPageId
public java.util.Collection<java.lang.String> getServiceInstancesIdsByAutoAdminPageId(java.lang.String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInstanceManagerSPI
Returns the service instance ids that use the indicated page id as the auto administration page.- Specified by:
getServiceInstancesIdsByAutoAdminPageId
in interfaceIServiceInstanceManagerSPI
- Parameters:
pageId
- to be looked for- Returns:
- collection of service instance ids that contain the page id as its auto administration page.
- Throws:
ManagerException
PortalException
-
getMenuXml
public java.lang.String getMenuXml(java.lang.String serviceInstanceId) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Returns the configuration menu in XML for a service instance.- Specified by:
getMenuXml
in interfaceIServiceInstanceManagerSPI
- Parameters:
serviceInstanceId
- the service instance identifier.- Returns:
- the menu in XML.
- Throws:
PortalException
- if the menu could not be generated.
-
getServiceInstancesByServiceAndWebsite
public java.util.Collection<ServiceInstanceConfig> getServiceInstancesByServiceAndWebsite(java.lang.String serviceId, java.lang.String websiteId) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Returns all instances of a given service inside a given website. If the website's channel has in it's tree another website, the other website's channel tree will be ignored. Also, ignores channel templates trees.- Specified by:
getServiceInstancesByServiceAndWebsite
in interfaceIServiceInstanceManagerSPI
- Parameters:
serviceId
- the service identifierwebsiteId
- the website identifier- Returns:
- all instances of a given service inside a given website.
- Throws:
PortalException
-
-