Package lumis.portal.serviceinstance
Class ServiceInstanceManager
- java.lang.Object
-
- lumis.portal.serviceinstance.ServiceInstanceManager
-
- All Implemented Interfaces:
IConfigDeleter
,IConfigKeyChecker
,IServiceInstanceManager
,IServiceInstanceManagerSPI
public class ServiceInstanceManager extends Object implements IServiceInstanceManagerSPI
Service instance manager implementation.- Since:
- 4.0.0
- Version:
- $Revision: 24751 $ $Date: 2021-10-24 21:31:31 -0300 (Sun, 24 Oct 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description static 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 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
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, 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 propertiesvoid
deleteCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, ITransaction transaction)
Deletes a service instance custom propertyString
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 dependencyboolean
existsRestShortName(String restShortName, String serviceInstanceIdToIgnore, String parentChannelId, ITransaction transaction)
Verify if a given name exists.ServiceInstanceConfig
findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, String channelId, String serviceId, ITransaction transaction)
Searches for a service instanceServiceInstanceConfig
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 onCollection<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 instancesCollection<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>
getIdsByChannelTreeAndAreaTags(SessionConfig sessionConfig, String rootChannelId, Collection<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.Collection<String>
getIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Get the ids of the services instances by passing the service id.String
getMenuXml(String serviceInstanceId)
Returns the configuration menu in XML for a service instance.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.Collection<String>
getServiceInstancesIdsByAutoAdminPageId(String pageId, ITransaction transaction)
Returns the service instance ids that use the indicated page id as the auto administration page.boolean
isGoogleAnalyticsEnabled(String propertyBagId)
Returns whether the Google Analytics is enable in the given property bag.boolean
isGoogleAnalyticsEnabled(ServiceInstanceConfig serviceInstanceConfig)
Returns whether the Google Analytics is enable in the given service instance.Boolean
isGoogleAnalyticsEnabledLocal(String propertyBagId)
Returns whether the Google Analytics is enable in the given property bag ornull
if this property is inherited.Boolean
isGoogleAnalyticsEnabledLocal(ServiceInstanceConfig serviceInstanceConfig)
Returns whether the Google Analytics is enable in the given service instance ornull
if this property is inherited.boolean
keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
Checks if configId matches an already persisted objectvoid
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 instancevoid
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)
Receives a Map with one or more properties to be set for the given service instance.void
setCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, String name, String value, ITransaction transaction)
Set a custom property for the given service instance.void
setGoogleAnalyticsEnable(Boolean enabled, String propertyBagId)
Sets whether the Google Analytics is enable in the given property bag.void
setGoogleAnalyticsEnable(Boolean enabled, ServiceInstanceConfig serviceInstanceConfig)
Sets whether the Google Analytics is enable in 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.
-
-
-
Field Detail
-
DELETED_SERVICE_INSTANCES_TRANSACTION_ATTRIBUTE_NAME
public static final String DELETED_SERVICE_INSTANCES_TRANSACTION_ATTRIBUTE_NAME
-
-
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(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(String restShortName, String serviceInstanceIdToIgnore, 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(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(String serviceInstanceDependencyId, ITransaction transaction) throws PortalException
- Specified by:
getDependency
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
findServiceInstanceThroughChannelTree
public ServiceInstanceConfig findServiceInstanceThroughChannelTree(SessionConfig sessionConfig, String channelId, 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 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, 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 Collection<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 Collection<String> getIdsByChannelId(SessionConfig sessionConfig, 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 Collection<String> getIdsByChannelTree(SessionConfig sessionConfig, 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 Collection<String> getIdsByChannelTreeAndAreaTags(SessionConfig sessionConfig, String rootChannelId, Collection<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 Collection<String> getIdsByServiceId(SessionConfig sessionConfig, 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 String getCustomProperty(SessionConfig sessionConfig, String serviceInstanceId, 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, String serviceInstanceId, String name, 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, String serviceInstanceId, Map<String,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, String serviceInstanceId, 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, 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, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws PortalException
- Specified by:
serialize
in interfaceIServiceInstanceManager
- Throws:
ManagerException
PortalException
-
deserialize
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInstanceNode, ITransaction transaction) throws PortalException
- Specified by:
deserialize
in interfaceIServiceInstanceManager
- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
getServiceInstanceByDependency
public ServiceInstanceConfig getServiceInstanceByDependency(SessionConfig sessionConfig, String serviceInstanceId, 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 Collection<ServiceInstanceConfig> getServiceInstancesByDependency(SessionConfig sessionConfig, String serviceInstanceId, 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, String serviceInstanceId, 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 Collection<String> getDependencyIdsByServiceInstanceId(SessionConfig sessionConfig, 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 Collection<String> getDependentServiceInstanceIds(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
- Specified by:
getDependentServiceInstanceIds
in interfaceIServiceInstanceManager
- Throws:
PortalException
-
getDependentServiceInstances
public Collection<ServiceInstanceConfig> getDependentServiceInstances(SessionConfig sessionConfig, 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 String deserializeDependency(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, 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 Map<String,String> getCustomProperties(SessionConfig sessionConfig, 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 Collection<FileTransformation> getFileTransformations(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, String serviceInstanceId, 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, 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 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, 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(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, String configId) throws PortalException
- Specified by:
deleteConfig
in interfaceIConfigDeleter
- Throws:
PortalException
-
keyExists
public boolean keyExists(SessionConfig sessionConfig, Object configKey, 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, String serviceInstanceId, 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 Collection<String> getServiceInstancesIdsByAutoAdminPageId(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 String getMenuXml(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.
-
isGoogleAnalyticsEnabledLocal
public Boolean isGoogleAnalyticsEnabledLocal(ServiceInstanceConfig serviceInstanceConfig) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Returns whether the Google Analytics is enable in the given service instance ornull
if this property is inherited.- Specified by:
isGoogleAnalyticsEnabledLocal
in interfaceIServiceInstanceManagerSPI
- Parameters:
serviceInstanceConfig
- the service instance the information will be read from.- Returns:
- whether the Google Analytics is enable in the given service instance or
null
if this property is inherited. - Throws:
PortalException
-
isGoogleAnalyticsEnabled
public boolean isGoogleAnalyticsEnabled(ServiceInstanceConfig serviceInstanceConfig) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Returns whether the Google Analytics is enable in the given service instance.- Specified by:
isGoogleAnalyticsEnabled
in interfaceIServiceInstanceManagerSPI
- Parameters:
serviceInstanceConfig
- the service instance the information will be read from.- Returns:
- whether the Google Analytics is enable in the given service instance.
- Throws:
PortalException
-
setGoogleAnalyticsEnable
public void setGoogleAnalyticsEnable(Boolean enabled, ServiceInstanceConfig serviceInstanceConfig) throws PortalException
Description copied from interface:IServiceInstanceManagerSPI
Sets whether the Google Analytics is enable in the given service instance.- Specified by:
setGoogleAnalyticsEnable
in interfaceIServiceInstanceManagerSPI
- Parameters:
enabled
- the value ornull
to indicate the value should be inherited.serviceInstanceConfig
- the service instance the information will be set to.- Throws:
PortalException
-
isGoogleAnalyticsEnabledLocal
public Boolean isGoogleAnalyticsEnabledLocal(String propertyBagId) throws PortalException
Returns whether the Google Analytics is enable in the given property bag ornull
if this property is inherited.- Parameters:
propertyBagId
- the identifier of the property bag the information will be read from.- Returns:
- whether the Google Analytics is enable in the given property bag or
null
if this property is inherited. - Throws:
PortalException
- Since:
- 8.2.0
-
isGoogleAnalyticsEnabled
public boolean isGoogleAnalyticsEnabled(String propertyBagId) throws PortalException
Returns whether the Google Analytics is enable in the given property bag.- Parameters:
propertyBagId
- the identifier of the property bag the information will be read from.- Returns:
- whether the Google Analytics is enable in the given property bag.
- Throws:
PortalException
- Since:
- 8.2.0
-
setGoogleAnalyticsEnable
public void setGoogleAnalyticsEnable(Boolean enabled, String propertyBagId) throws PortalException
Sets whether the Google Analytics is enable in the given property bag.- Parameters:
enabled
- the value ornull
to indicate the value should be inherited.propertyBagId
- the identifier of the property bag the information will be set to.- Throws:
PortalException
- Since:
- 8.2.0
-
-