Class ServiceInterfaceInstanceManager
- java.lang.Object
-
- lumis.portal.serviceinterfaceinstance.ServiceInterfaceInstanceManager
-
- All Implemented Interfaces:
IConfigKeyChecker
,IServiceInterfaceInstanceManager
,IServiceInterfaceInstanceManagerSPI
public class ServiceInterfaceInstanceManager extends java.lang.Object implements IServiceInterfaceInstanceManagerSPI
Class responsible for operations with Service Interface Instances- Since:
- 4.0.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_CACHE_SELECTION
Key to store/retrieve the selected BusinessContext items to be used in service interface instance caching.static java.lang.String
KEY_CACHE_TIMEOUT
Key to store/retrieve the selected expiration items to be used in service interface instance caching.static java.lang.String
KEY_CUSTOM_PROPERTY_CACHE_KEY_BUSINESS_CONTEXT
Constant indicating that the value stored in the cache key generation custom property uses BusinessContext.static java.lang.String
KEY_CUSTOM_PROPERTY_CACHE_KEY_CLASS
Constant indicating that the value stored in the cache key generation custom property uses a configured class.static java.lang.String
KEY_CUSTOM_PROPERTY_CACHE_KEY_DEFAULT_CONFIGURATION
Constant indicating that the value stored in the cache key generation custom property uses the default values.
-
Constructor Summary
Constructors Constructor Description ServiceInterfaceInstanceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
add(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Add a service interface instance.void
addOrUpdate(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Service Interface Instancevoid
clearCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Clears the caches of a service interface instance.void
clearCache(ITransaction transaction)
Clears all cache stored in this manager.void
clearHtmlCache(java.lang.String serviceInterfaceInstanceId)
Clears the HTML cache of a service interface instance.void
clearInterfaceInstanceCacheKeyProviderCache()
Clears the cache for interface instance cache key provider classes.void
clearTimeoutCache(java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Clears the cache for the timeout cache value.java.lang.String
copy(SessionConfig sessionConfig, java.lang.String sourceServiceInterfaceInstanceId, java.lang.String destinationPageId, boolean destinationInterfaceInstanceIsFromTemplate, ITransaction transaction)
Creates a copy of the given interface instance to the specified page.java.lang.String
copy(SessionConfig sessionConfig, java.lang.String sourceServiceInterfaceInstanceId, java.lang.String destinationPageId, java.lang.Class<? extends IServiceInterfaceInstanceOwner> ownerClass, boolean destinationInterfaceInstanceIsFromTemplate, ITransaction transaction)
Copies a Service Interface Instance based on the passed id to a given page or orphan if owner info is passed.void
delete(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Delete a service interface instance.void
deleteCustomProperties(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction)
Deletes all the interface instance custom propertiesvoid
deleteCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, ITransaction transaction)
Deletes the interface instance custom propertyjava.lang.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInterfaceInstanceNode, ITransaction transaction)
void
deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInterfaceInstanceCustomPropertiesNode, ITransaction transaction)
Deprecated.java.lang.String
generateMenu(org.w3c.dom.Node menuDefinition, IMenuItemParser menuItemParser, org.w3c.dom.Element defaultMenu)
Generates a configuration menu XML definition for use by Portal Studio.ServiceInterfaceInstanceConfig
get(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Get the configuration of the service interface instance.int
getCacheLevel(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cacheLevel property of an interface instance.int
getCachePersonalization(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cachePersonalization property of an interface instance.boolean
getCacheServerSideInclude(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cacheServerSideInclude property of an interface instance.java.util.Map<java.lang.String,java.lang.String>
getCustomProperties(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction)
Returns a Map containing all name/value pairs of custom properties from the specified service interface instance.java.lang.String
getCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, ITransaction transaction)
Returns the specified custom property.java.lang.String
getDisplayName(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Returns the display name for a service interface instance.boolean
getEnableCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the enableCache property of an interface instance.java.util.Collection<java.lang.String>
getIdsByBaseServiceInterfaceInstance(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the identifiers of derived interface instances that derives from the interface instance with the given identifier.java.util.Collection<java.lang.String>
getIdsByPageId(SessionConfig sessionConfig, java.lang.String pageId, ITransaction transaction)
Get a list of ids by passing the page's id.java.util.Collection<java.lang.String>
getIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, boolean includeRunTimeInterfaces, ITransaction transaction)
Get the Ids given the ServiceInstanceId.java.util.Collection<java.lang.String>
getIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Get a list of ids by passing the id of the service instance.java.util.Collection<java.lang.String>
getIdsByServiceInterfaceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction)
Get a list of ids by passing the ids of the service interface.java.util.Collection<java.lang.String>
getIdsByServiceInterfaceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, boolean ignoreRuntimeInterfaces, ITransaction transaction)
Get a list of ids by passing the ids of the service interface.java.util.Collection<java.lang.String>
getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction)
Get a list of ids by passing the ids of service interface and the service instance.java.util.Collection<java.lang.String>
getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, boolean ignoreRuntimeInterfaces, ITransaction transaction)
Get a list of ids by passing the ids of service interface and the service instance.java.util.Collection<java.lang.String>
getIdsByServiceInterfaceStyleId(SessionConfig sessionConfig, java.lang.String serviceInterfaceStyleId, java.lang.String serviceInterfaceId, ITransaction transaction)
Get the Ids given the ServiceInterfaceStyleId.ServiceInterfaceInstanceCacheEntry
getInterfaceInstanceHtmlCache(java.lang.String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, ITransaction transaction)
Get the HTML Cache of the Interface Instance.java.lang.String
getInterfaceInstanceHtmlCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.util.Locale locale, ITransaction transaction)
Get the HTML Cache of the Interface Instance.java.lang.String
getMenu(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Deprecated.java.lang.String
getMenuItemXml(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, java.lang.String menuItemId, ITransaction transaction)
Returns the XML for the menu item in the specified service interface instance and menu level.java.lang.String
getMenuXml(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, ITransaction transaction)
Returns the XML for the menu for the specified service interface instance and menu level.ServiceInterfaceInstanceConfig
getOrAddServiceInterfaceRunTimeInstance(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, java.lang.String pageId, ITransaction transaction)
Get or Add the ServiceInterfaceRunTimeInstance.boolean
getPrintable(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the printable property of an interface instance.int
getRenderAs(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction)
Returns the renderAs property of an interface instance.IConfigKeyChecker
getServiceInterfaceInstanceStyleConfigKeyChecker()
java.lang.String
getTitle(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Returns the title for a service interface instance.java.lang.String
getXmlData(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId)
Returns the previously saved XML data for the service interface instance for the given user sessionboolean
isDerivedFromTemplate(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Verify whether service interface instance is derived from a channel template or page template.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 serviceInterfaceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
void
serializeCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.io.OutputStream outputStream, ITransaction transaction)
void
setCustomProperties(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, 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 interface.void
setCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, java.lang.String value, ITransaction transaction)
Set a custom property for the given interface instance.void
setInterfaceInstanceHtmlCache(java.lang.String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, java.lang.String serviceInterfaceInstanceHtml, java.util.Map<PortalPrintWriter.WritePosition,java.util.LinkedHashMap<java.lang.String,java.lang.String>> headWrites, ITransaction transaction)
Set the HTML Cache of the Interface Instance.void
setInterfaceInstanceHtmlCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.util.Locale locale, java.lang.String serviceInterfaceInstanceHtml, ITransaction transaction)
Get the HTML Cache of the Interface Instance.void
update(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Update a service interface instance.void
updateCustomPropertiesFromTemplate(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction)
Update the interface instance custom properties from parent interface instancevoid
updatePropertiesFromTemplate(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction)
Update the properties of from the template.
-
-
-
Field Detail
-
KEY_CUSTOM_PROPERTY_CACHE_KEY_BUSINESS_CONTEXT
public static final java.lang.String KEY_CUSTOM_PROPERTY_CACHE_KEY_BUSINESS_CONTEXT
Constant indicating that the value stored in the cache key generation custom property uses BusinessContext.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
KEY_CUSTOM_PROPERTY_CACHE_KEY_CLASS
public static final java.lang.String KEY_CUSTOM_PROPERTY_CACHE_KEY_CLASS
Constant indicating that the value stored in the cache key generation custom property uses a configured class.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
KEY_CUSTOM_PROPERTY_CACHE_KEY_DEFAULT_CONFIGURATION
public static final java.lang.String KEY_CUSTOM_PROPERTY_CACHE_KEY_DEFAULT_CONFIGURATION
Constant indicating that the value stored in the cache key generation custom property uses the default values.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
KEY_CACHE_SELECTION
public static final java.lang.String KEY_CACHE_SELECTION
Key to store/retrieve the selected BusinessContext items to be used in service interface instance caching.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
KEY_CACHE_TIMEOUT
public static final java.lang.String KEY_CACHE_TIMEOUT
Key to store/retrieve the selected expiration items to be used in service interface instance caching.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Service Interface Instance- Specified by:
addOrUpdate
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
get
public ServiceInterfaceInstanceConfig get(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get the configuration of the service interface instance.- Specified by:
get
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a ServiceInterfaceInstanceConfig.
- Throws:
ManagerException
PortalException
-
add
public java.lang.String add(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Add a service interface instance.- Specified by:
add
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
update
public void update(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Update a service interface instance.- Specified by:
update
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
delete
public void delete(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Delete a service interface instance.- Specified by:
delete
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
copy
public java.lang.String copy(SessionConfig sessionConfig, java.lang.String sourceServiceInterfaceInstanceId, java.lang.String destinationPageId, boolean destinationInterfaceInstanceIsFromTemplate, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Creates a copy of the given interface instance to the specified page. All interface instance custom properties are copied to the new interface instance.- Specified by:
copy
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
copy
public java.lang.String copy(SessionConfig sessionConfig, java.lang.String sourceServiceInterfaceInstanceId, java.lang.String destinationPageId, java.lang.Class<? extends IServiceInterfaceInstanceOwner> ownerClass, boolean destinationInterfaceInstanceIsFromTemplate, ITransaction transaction) throws PortalException
Copies a Service Interface Instance based on the passed id to a given page or orphan if owner info is passed. Should the new copy of the intefaceInstance be an orphan, the pageId needs to be null and the ownerInfo needs to be filled.- Parameters:
sessionConfig
- instance of SessionConfig.sourceServiceInterfaceInstanceId
- source ServiceInterfaceInstanceIddestinationPageId
- the page id where the new interfaceInstance should appear. In case of an orphan interfaceInstance, null should be passed.ownerClass
- the owner class of interface instancedestinationInterfaceInstanceIsFromTemplate
-transaction
- transaction in which the copy should happen- Returns:
- the id of the new InterfaceInstance
- Throws:
PortalException
- Since:
- 6.0.0
-
getOrAddServiceInterfaceRunTimeInstance
public ServiceInterfaceInstanceConfig getOrAddServiceInterfaceRunTimeInstance(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, java.lang.String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get or Add the ServiceInterfaceRunTimeInstance.- Specified by:
getOrAddServiceInterfaceRunTimeInstance
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a ServiceInterfaceInstanceConfig.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInterfaceId
public java.util.Collection<java.lang.String> getIdsByServiceInterfaceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, boolean ignoreRuntimeInterfaces, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the ids of the service interface.- Specified by:
getIdsByServiceInterfaceId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a arrays of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInterfaceId
public java.util.Collection<java.lang.String> getIdsByServiceInterfaceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the ids of the service interface.- Specified by:
getIdsByServiceInterfaceId
in interfaceIServiceInterfaceInstanceManager
ignorePageTemplates
- TODO- Returns:
- a arrays of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInstanceId
public java.util.Collection<java.lang.String> getIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the id of the service instance.- Specified by:
getIdsByServiceInstanceId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInstanceId
public java.util.Collection<java.lang.String> getIdsByServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInstanceId, boolean includeRunTimeInterfaces, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get the Ids given the ServiceInstanceId.- Specified by:
getIdsByServiceInstanceId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInterfaceIdAndServiceInstanceId
public java.util.Collection<java.lang.String> getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, boolean ignoreRuntimeInterfaces, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the ids of service interface and the service instance.- Specified by:
getIdsByServiceInterfaceIdAndServiceInstanceId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInterfaceIdAndServiceInstanceId
public java.util.Collection<java.lang.String> getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, java.lang.String serviceInterfaceId, java.lang.String serviceInstanceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the ids of service interface and the service instance.- Specified by:
getIdsByServiceInterfaceIdAndServiceInstanceId
in interfaceIServiceInterfaceInstanceManager
ignorePageTemplates
- TODO- Returns:
- a array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByPageId
public java.util.Collection<java.lang.String> getIdsByPageId(SessionConfig sessionConfig, java.lang.String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get a list of ids by passing the page's id.- Specified by:
getIdsByPageId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a array of strings.
- Throws:
ManagerException
PortalException
-
getIdsByServiceInterfaceStyleId
public java.util.Collection<java.lang.String> getIdsByServiceInterfaceStyleId(SessionConfig sessionConfig, java.lang.String serviceInterfaceStyleId, java.lang.String serviceInterfaceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get the Ids given the ServiceInterfaceStyleId.- Specified by:
getIdsByServiceInterfaceStyleId
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a arrays of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByBaseServiceInterfaceInstance
public java.util.Collection<java.lang.String> getIdsByBaseServiceInterfaceInstance(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Returns the identifiers of derived interface instances that derives from the interface instance with the given identifier.- Specified by:
getIdsByBaseServiceInterfaceInstance
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
sessionConfig
- the user session.serviceInterfaceInstanceId
- the base interface instance identifier.transaction
- the transaction.- Returns:
- the identifiers of derived interface instances that derives from the interface instance with the given identifier.
- Throws:
PortalException
-
getCustomProperty
public java.lang.String getCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the specified custom property. If the property has not been set earlier, null is returned.- Specified by:
getCustomProperty
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getCustomProperties
public java.util.Map<java.lang.String,java.lang.String> getCustomProperties(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns a Map containing all name/value pairs of custom properties from the specified service interface instance.- Specified by:
getCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Parameters:
sessionConfig
- the user session information.interfaceInstanceId
- the service interface instance id.transaction
- the transaction for persistence access.- Returns:
- the map with the properties.
- Throws:
ManagerException
PortalException
-
setCustomProperty
public void setCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, java.lang.String value, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Set a custom property for the given interface 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:
setCustomProperty
in interfaceIServiceInterfaceInstanceManager
- Parameters:
sessionConfig
- the user session information.interfaceInstanceId
- the service interface instance id.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 interfaceInstanceId, java.util.Map<java.lang.String,java.lang.String> propertiesTable, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Receives a Map with one or more properties to be set for the given interface. 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 interfaceIServiceInterfaceInstanceManager
- Parameters:
sessionConfig
- the user session information.interfaceInstanceId
- the service interface instance id.propertiesTable
- the map with the properties.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
deleteCustomProperty
public void deleteCustomProperty(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, java.lang.String name, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Deletes the interface instance custom property- Specified by:
deleteCustomProperty
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
deleteCustomProperties
public void deleteCustomProperties(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Deletes all the interface instance custom properties- Specified by:
deleteCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
getMenu
@Deprecated public java.lang.String getMenu(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws PortalException
Deprecated.Description copied from interface:IServiceInterfaceInstanceManager
Returns the XML for the administration menu of the specified interface instance- Specified by:
getMenu
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getMenuXml
public java.lang.String getMenuXml(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the XML for the menu for the specified service interface instance and menu level.- Specified by:
getMenuXml
in interfaceIServiceInterfaceInstanceManager
- Parameters:
sessionConfig
- the user session information.serviceInterfaceInstanceId
- the identifier of the service interface instance.menuLevel
- the menu level.transaction
- transaction for persistence access.- Returns:
- a XML with the menu items available.
- Throws:
PortalException
-
getMenuItemXml
public java.lang.String getMenuItemXml(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, java.lang.String menuItemId, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Returns the XML for the menu item in the specified service interface instance and menu level.- Specified by:
getMenuItemXml
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
sessionConfig
- the user session information.serviceInterfaceInstanceId
- the identifier of the service interface instance.menuLevel
- the menu level.menuItemId
- the menu item identifier.transaction
- transaction for persistence access.- Returns:
- a XML with the menu item.
- Throws:
PortalException
-
generateMenu
public java.lang.String generateMenu(org.w3c.dom.Node menuDefinition, IMenuItemParser menuItemParser, org.w3c.dom.Element defaultMenu) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Generates a configuration menu XML definition for use by Portal Studio.- Specified by:
generateMenu
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
menuDefinition
- the menu to be included.menuItemParser
- the parser is able to process menu items.defaultMenu
- the default menu definition.- Returns:
- the menu XML.
- Throws:
PortalException
- if the menu cannot be generated.
-
updateCustomPropertiesFromTemplate
public void updateCustomPropertiesFromTemplate(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Update the interface instance custom properties from parent interface instance- Specified by:
updateCustomPropertiesFromTemplate
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
getXmlData
public java.lang.String getXmlData(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the previously saved XML data for the service interface instance for the given user session- Specified by:
getXmlData
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getPrintable
public boolean getPrintable(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the printable property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getPrintable
in interfaceIServiceInterfaceInstanceManager
- Returns:
- true if ServiceInterface is printable and false otherwise.
- Throws:
ManagerException
PortalException
-
getRenderAs
public int getRenderAs(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the renderAs property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getRenderAs
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a integer.
- Throws:
ManagerException
PortalException
-
getEnableCache
public boolean getEnableCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the enableCache property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getEnableCache
in interfaceIServiceInterfaceInstanceManager
- Returns:
- true if the Cache is enable.
- Throws:
ManagerException
PortalException
-
getCacheLevel
public int getCacheLevel(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the cacheLevel property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getCacheLevel
in interfaceIServiceInterfaceInstanceManager
- Returns:
- an integer.
- Throws:
ManagerException
PortalException
-
getCachePersonalization
public int getCachePersonalization(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the cachePersonalization property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getCachePersonalization
in interfaceIServiceInterfaceInstanceManager
- Returns:
- an integer.
- Throws:
ManagerException
PortalException
-
getCacheServerSideInclude
public boolean getCacheServerSideInclude(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the cacheServerSideInclude property of an interface instance. It may be necessary to look at the interface definition- Specified by:
getCacheServerSideInclude
in interfaceIServiceInterfaceInstanceManager
- Returns:
- true if the ... and false otherwise.
- Throws:
ManagerException
PortalException
-
serialize
public void serialize(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serialize
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
deserialize
public java.lang.String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInterfaceInstanceNode, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserialize
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
serializeCustomProperties
public void serializeCustomProperties(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serializeCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
deserializeCustomProperties
@Deprecated public void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node serviceInterfaceInstanceCustomPropertiesNode, ITransaction transaction) throws ManagerException, PortalException
Deprecated.- Specified by:
deserializeCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
clearCache
public void clearCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Clears the caches of a service interface instance.Clears service interface instance related information, cached in this manager, including HTML cache, and its XSL cache.
- Specified by:
clearCache
in interfaceIServiceInterfaceInstanceManager
- Parameters:
sessionConfig
- the user session information.serviceInterfaceInstanceId
- the service interface instance identifier.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
clearHtmlCache
public void clearHtmlCache(java.lang.String serviceInterfaceInstanceId) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Clears the HTML cache of a service interface instance.- Specified by:
clearHtmlCache
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
serviceInterfaceInstanceId
- the service interface instance identifier.- Throws:
PortalException
-
clearCache
public void clearCache(ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Clears all cache stored in this manager.- Specified by:
clearCache
in interfaceIServiceInterfaceInstanceManager
- Parameters:
transaction
- the transaction for persistence access. If null, the cache is just cleared, else it is cleared as a transactional operation as specified inPortalCache.clear(ITransaction)
.- Throws:
PortalException
-
setInterfaceInstanceHtmlCache
public void setInterfaceInstanceHtmlCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.util.Locale locale, java.lang.String serviceInterfaceInstanceHtml, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get the HTML Cache of the Interface Instance.- Specified by:
setInterfaceInstanceHtmlCache
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
getInterfaceInstanceHtmlCache
public java.lang.String getInterfaceInstanceHtmlCache(SessionConfig sessionConfig, java.lang.String serviceInterfaceInstanceId, java.util.Locale locale, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Get the HTML Cache of the Interface Instance.- Specified by:
getInterfaceInstanceHtmlCache
in interfaceIServiceInterfaceInstanceManager
- Returns:
- Throws:
ManagerException
PortalException
-
updatePropertiesFromTemplate
public void updatePropertiesFromTemplate(SessionConfig sessionConfig, java.lang.String interfaceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Update the properties of from the template.- Specified by:
updatePropertiesFromTemplate
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
getServiceInterfaceInstanceStyleConfigKeyChecker
public IConfigKeyChecker getServiceInterfaceInstanceStyleConfigKeyChecker()
- Specified by:
getServiceInterfaceInstanceStyleConfigKeyChecker
in interfaceIServiceInterfaceInstanceManager
-
getTitle
public java.lang.String getTitle(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the title for a service interface instance. The title is calculated from the service interface instance and the service interface properties/definitions.- Specified by:
getTitle
in interfaceIServiceInterfaceInstanceManager
- Parameters:
serviceInterfaceInstanceConfig
- the service interface instance.transaction
- the transaction for persistence access.- Returns:
- the title. May be a localizable string.
- Throws:
PortalException
-
getDisplayName
public java.lang.String getDisplayName(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterfaceInstanceManager
Returns the display name for a service interface instance. The display name is calculated from the service interface instance and the service interface properties/definitions.- Specified by:
getDisplayName
in interfaceIServiceInterfaceInstanceManager
- Parameters:
serviceInterfaceInstanceConfig
- the service interface instance.transaction
- the transaction for persistence access.- Returns:
- the display name. May be a localizable string.
- Throws:
PortalException
-
isDerivedFromTemplate
public boolean isDerivedFromTemplate(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Verify whether service interface instance is derived from a channel template or page template.- Parameters:
sessionConfig
- session config of the user request.serviceInterfaceInstanceConfig
- instance to be checked.transaction
- transaction used to get information from database.- Returns:
- true if the the instance is derived from a template, otherwise false.
- Throws:
ManagerException
- if an error occurs during the communication with database.PortalException
- if an other error occurs during the process.- Since:
- 6.2.0
-
setInterfaceInstanceHtmlCache
public void setInterfaceInstanceHtmlCache(java.lang.String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, java.lang.String serviceInterfaceInstanceHtml, java.util.Map<PortalPrintWriter.WritePosition,java.util.LinkedHashMap<java.lang.String,java.lang.String>> headWrites, ITransaction transaction) throws BusinessContextNotEnabledForCurrentChannelException, BusinessContextPropertyNotFoundException, CacheKeyProviderClassNotFoundException, PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Set the HTML Cache of the Interface Instance.- Specified by:
setInterfaceInstanceHtmlCache
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
serviceInterfaceInstanceId
- the id of the cache that should be used.request
- the request from which the cache key will be extracted.serviceInterfaceInstanceHtml
- html to cache.headWrites
- the head before writes to be cached.transaction
- in which the method should participate.- Throws:
BusinessContextNotEnabledForCurrentChannelException
- if the business context has not been enabled/selected in the serviceInterfaceInstance channel.BusinessContextPropertyNotFoundException
- if the property to use as cache was not found in the current BusinessContext.CacheKeyProviderClassNotFoundException
- ifIInterfaceInstanceCacheKeyProvider
implementation class is not available during runtime.PortalException
-
getInterfaceInstanceHtmlCache
public ServiceInterfaceInstanceCacheEntry getInterfaceInstanceHtmlCache(java.lang.String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, ITransaction transaction) throws BusinessContextNotEnabledForCurrentChannelException, BusinessContextPropertyNotFoundException, CacheKeyProviderClassNotFoundException, PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Get the HTML Cache of the Interface Instance.- Specified by:
getInterfaceInstanceHtmlCache
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
serviceInterfaceInstanceId
- the id of the cache that should be used.request
- the request from which the cache key will be extracted.transaction
- in which the method should participate.- Returns:
- the cached html for the service interface instance.
- Throws:
BusinessContextNotEnabledForCurrentChannelException
- if the business context has not been enabled/selected in the serviceInterfaceInstance channel.BusinessContextPropertyNotFoundException
- if the property to use as cache was not found in the current BusinessContext.CacheKeyProviderClassNotFoundException
- ifIInterfaceInstanceCacheKeyProvider
implementation class is not available during runtime.PortalException
-
clearTimeoutCache
public void clearTimeoutCache(java.lang.String serviceInterfaceInstanceId, ITransaction transaction) throws CacheKeyProviderClassNotFoundException, PortalException
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Clears the cache for the timeout cache value.- Specified by:
clearTimeoutCache
in interfaceIServiceInterfaceInstanceManagerSPI
- Parameters:
serviceInterfaceInstanceId
- of which the timeout has changed.transaction
- in which the method should participate.- Throws:
PortalException
CacheKeyProviderClassNotFoundException
-
clearInterfaceInstanceCacheKeyProviderCache
public void clearInterfaceInstanceCacheKeyProviderCache()
Description copied from interface:IServiceInterfaceInstanceManagerSPI
Clears the cache for interface instance cache key provider classes.- Specified by:
clearInterfaceInstanceCacheKeyProviderCache
in interfaceIServiceInterfaceInstanceManagerSPI
-
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
-
-