Class ServiceInterfaceInstanceManager
- java.lang.Object
-
- lumis.portal.serviceinterfaceinstance.ServiceInterfaceInstanceManager
-
- All Implemented Interfaces:
IConfigKeyChecker
,IServiceInterfaceInstanceManager
,IServiceInterfaceInstanceManagerSPI
public class ServiceInterfaceInstanceManager extends Object implements IServiceInterfaceInstanceManagerSPI
Class responsible for operations with Service Interface Instances- Since:
- 4.0.0
- Version:
- $Revision: 22045 $ $Date: 2018-10-29 18:55:17 -0300 (Mon, 29 Oct 2018) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_CACHE_SELECTION
Key to store/retrieve the selected BusinessContext items to be used in service interface instance caching.static String
KEY_CACHE_TIMEOUT
Key to store/retrieve the selected expiration items to be used in service interface instance caching.static String
KEY_CUSTOM_PROPERTY_CACHE_KEY_BUSINESS_CONTEXT
Constant indicating that the value stored in the cache key generation custom property uses BusinessContext.static 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 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 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, 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(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(String serviceInterfaceInstanceId, ITransaction transaction)
Clears the cache for the timeout cache value.String
copy(SessionConfig sessionConfig, String sourceServiceInterfaceInstanceId, String destinationPageId, boolean destinationInterfaceInstanceIsFromTemplate, ITransaction transaction)
Creates a copy of the given interface instance to the specified page.String
copy(SessionConfig sessionConfig, String sourceServiceInterfaceInstanceId, String destinationPageId, 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, String serviceInterfaceInstanceId, ITransaction transaction)
Delete a service interface instance.void
deleteCustomProperties(SessionConfig sessionConfig, String interfaceInstanceId, ITransaction transaction)
Deletes all the interface instance custom propertiesvoid
deleteCustomProperty(SessionConfig sessionConfig, String interfaceInstanceId, String name, ITransaction transaction)
Deletes the interface instance custom propertyString
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInterfaceInstanceNode, ITransaction transaction)
void
deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInterfaceInstanceCustomPropertiesNode, ITransaction transaction)
Deprecated.String
generateMenu(Node menuDefinition, IMenuItemParser menuItemParser, Element defaultMenu)
Generates a configuration menu XML definition for use by Portal Studio.ServiceInterfaceInstanceConfig
get(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Get the configuration of the service interface instance.int
getCacheLevel(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cacheLevel property of an interface instance.int
getCachePersonalization(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cachePersonalization property of an interface instance.boolean
getCacheServerSideInclude(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the cacheServerSideInclude property of an interface instance.Map<String,String>
getCustomProperties(SessionConfig sessionConfig, String interfaceInstanceId, ITransaction transaction)
Returns a Map containing all name/value pairs of custom properties from the specified service interface instance.String
getCustomProperty(SessionConfig sessionConfig, String interfaceInstanceId, String name, ITransaction transaction)
Returns the specified custom property.String
getDisplayName(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Returns the display name for a service interface instance.boolean
getEnableCache(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the enableCache property of an interface instance.Collection<String>
getIdsByBaseServiceInterfaceInstance(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the identifiers of derived interface instances that derives from the interface instance with the given identifier.Collection<String>
getIdsByPageId(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Get a list of ids by passing the page's id.Collection<String>
getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, boolean includeRunTimeInterfaces, ITransaction transaction)
Get the Ids given the ServiceInstanceId.Collection<String>
getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
Get a list of ids by passing the id of the service instance.Collection<String>
getIdsByServiceInterfaceId(SessionConfig sessionConfig, String serviceInterfaceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction)
Get a list of ids by passing the ids of the service interface.Collection<String>
getIdsByServiceInterfaceId(SessionConfig sessionConfig, String serviceInterfaceId, boolean ignoreRuntimeInterfaces, ITransaction transaction)
Get a list of ids by passing the ids of the service interface.Collection<String>
getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, String serviceInterfaceId, String serviceInstanceId, boolean ignoreRuntimeInterfaces, boolean ignorePageTemplates, ITransaction transaction)
Get a list of ids by passing the ids of service interface and the service instance.Collection<String>
getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, String serviceInterfaceId, String serviceInstanceId, boolean ignoreRuntimeInterfaces, ITransaction transaction)
Get a list of ids by passing the ids of service interface and the service instance.Collection<String>
getIdsByServiceInterfaceStyleId(SessionConfig sessionConfig, String serviceInterfaceStyleId, String serviceInterfaceId, ITransaction transaction)
Get the Ids given the ServiceInterfaceStyleId.ServiceInterfaceInstanceCacheEntry
getInterfaceInstanceHtmlCache(String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, ITransaction transaction)
Get the HTML Cache of the Interface Instance.String
getInterfaceInstanceHtmlCache(SessionConfig sessionConfig, String serviceInterfaceInstanceId, Locale locale, ITransaction transaction)
Get the HTML Cache of the Interface Instance.String
getMenu(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Deprecated.String
getMenuItemXml(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, String menuItemId, ITransaction transaction)
Returns the XML for the menu item in the specified service interface instance and menu level.String
getMenuXml(SessionConfig sessionConfig, 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, String serviceInterfaceId, String serviceInstanceId, String pageId, ITransaction transaction)
Get or Add the ServiceInterfaceRunTimeInstance.boolean
getPrintable(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the printable property of an interface instance.int
getRenderAs(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ITransaction transaction)
Returns the renderAs property of an interface instance.IConfigKeyChecker
getServiceInterfaceInstanceStyleConfigKeyChecker()
String
getTitle(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Returns the title for a service interface instance.String
getXmlData(SessionConfig sessionConfig, 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, Object configKey, Object config, ITransaction transaction)
Checks if configId matches an already persisted objectvoid
serialize(SessionConfig sessionConfig, String serviceInterfaceInstanceId, OutputStream outputStream, ITransaction transaction)
void
serializeCustomProperties(SessionConfig sessionConfig, String serviceInterfaceInstanceId, OutputStream outputStream, ITransaction transaction)
void
setCustomProperties(SessionConfig sessionConfig, String interfaceInstanceId, Map<String,String> propertiesTable, ITransaction transaction)
Receives a Map with one or more properties to be set for the given interface.void
setCustomProperty(SessionConfig sessionConfig, String interfaceInstanceId, String name, String value, ITransaction transaction)
Set a custom property for the given interface instance.void
setInterfaceInstanceHtmlCache(String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, String serviceInterfaceInstanceHtml, Map<PortalPrintWriter.WritePosition,LinkedHashMap<String,String>> headWrites, ITransaction transaction)
Set the HTML Cache of the Interface Instance.void
setInterfaceInstanceHtmlCache(SessionConfig sessionConfig, String serviceInterfaceInstanceId, Locale locale, 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, String interfaceInstanceId, ITransaction transaction)
Update the interface instance custom properties from parent interface instancevoid
updatePropertiesFromTemplate(SessionConfig sessionConfig, String interfaceInstanceId, ITransaction transaction)
Update the properties of from the template.
-
-
-
Field Detail
-
KEY_CUSTOM_PROPERTY_CACHE_KEY_BUSINESS_CONTEXT
public static final 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 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 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 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 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, 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 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, 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 String copy(SessionConfig sessionConfig, String sourceServiceInterfaceInstanceId, 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 String copy(SessionConfig sessionConfig, String sourceServiceInterfaceInstanceId, String destinationPageId, 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, String serviceInterfaceId, String serviceInstanceId, 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 Collection<String> getIdsByServiceInterfaceId(SessionConfig sessionConfig, 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 Collection<String> getIdsByServiceInterfaceId(SessionConfig sessionConfig, 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 Collection<String> getIdsByServiceInstanceId(SessionConfig sessionConfig, 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 Collection<String> getIdsByServiceInstanceId(SessionConfig sessionConfig, 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 Collection<String> getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, String serviceInterfaceId, 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 Collection<String> getIdsByServiceInterfaceIdAndServiceInstanceId(SessionConfig sessionConfig, String serviceInterfaceId, 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 Collection<String> getIdsByPageId(SessionConfig sessionConfig, 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 Collection<String> getIdsByServiceInterfaceStyleId(SessionConfig sessionConfig, String serviceInterfaceStyleId, 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 Collection<String> getIdsByBaseServiceInterfaceInstance(SessionConfig sessionConfig, 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 String getCustomProperty(SessionConfig sessionConfig, String interfaceInstanceId, 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 Map<String,String> getCustomProperties(SessionConfig sessionConfig, 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, String interfaceInstanceId, String name, 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, String interfaceInstanceId, Map<String,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, String interfaceInstanceId, 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, 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 String getMenu(SessionConfig sessionConfig, 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 String getMenuXml(SessionConfig sessionConfig, 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 String getMenuItemXml(SessionConfig sessionConfig, String serviceInterfaceInstanceId, ServiceInterfaceMenuLevel menuLevel, 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 String generateMenu(Node menuDefinition, IMenuItemParser menuItemParser, 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, 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 String getXmlData(SessionConfig sessionConfig, 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, 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, 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, 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, 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, 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, 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, String serviceInterfaceInstanceId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serialize
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
deserialize
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInterfaceInstanceNode, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserialize
in interfaceIServiceInterfaceInstanceManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
serializeCustomProperties
public void serializeCustomProperties(SessionConfig sessionConfig, String serviceInterfaceInstanceId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serializeCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
deserializeCustomProperties
@Deprecated public void deserializeCustomProperties(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node serviceInterfaceInstanceCustomPropertiesNode, ITransaction transaction) throws ManagerException, PortalException
Deprecated.- Specified by:
deserializeCustomProperties
in interfaceIServiceInterfaceInstanceManager
- Throws:
ManagerException
PortalException
-
clearCache
public void clearCache(SessionConfig sessionConfig, 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(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, String serviceInterfaceInstanceId, Locale locale, 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 String getInterfaceInstanceHtmlCache(SessionConfig sessionConfig, String serviceInterfaceInstanceId, 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, 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 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 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(String serviceInterfaceInstanceId, IServiceInterfaceRenderRequest request, String serviceInterfaceInstanceHtml, Map<PortalPrintWriter.WritePosition,LinkedHashMap<String,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(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(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, 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
-
-