Class ChannelManager
- java.lang.Object
-
- lumis.portal.channel.ChannelManager
-
- All Implemented Interfaces:
IChannelManager
,IChannelManagerSPI
,IConfigKeyChecker
,IWebResourceFactory
public class ChannelManager extends Object implements IChannelManagerSPI, IWebResourceFactory
Implementation for the channel manager.- Since:
- 4.0.0
- Version:
- $Revision: 23785 $ $Date: 2020-05-06 18:46:13 -0300 (Wed, 06 May 2020) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface lumis.portal.channel.IChannelManagerSPI
IChannelManagerSPI.IgnoreOnExportImportResult
-
-
Constructor Summary
Constructors Constructor Description ChannelManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
add(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Add a Channel.void
addCssLink(SessionConfig sessionConfig, String channelId, String cssId, int position, ITransaction transaction)
Add the hyperlink to the channel's CSS file.void
addOrUpdate(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Add or Update a Channel, depending on its previous existence.String
adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, String suffix)
Adjusts a friendly path due to clash.String
adjustResolvedFriendlyPath(WebResource webResource, String friendlyPath)
Adjusts a friendly path that has been resolved for a web resource.void
clearCache(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Clear the Channel cache.String
copy(SessionConfig sessionConfig, String sourceChannelId, String destinationParentChannelId, ITransaction transaction)
Creates a new channel by copying source channel's properties and structure into destination's parent channel.WebResource
createWebResourceByDynamicPath(String dynamicPath)
Creates aWebResource
instance based on a dynamic path.void
delete(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Delete the Channel.void
deleteCssLink(SessionConfig sessionConfig, String channelId, String cssId, ITransaction transaction)
Delete the hyperlink to the channel's CSS file.protected void
deleteRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction)
void
deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction)
void
deserializeSecondPass(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction)
Perfoms the second pass of the channels deserializationprotected void
disconnectChannelsFromTemplatesRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
ChannelConfig
get(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get the Channel's configuration.int
getCachePages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
boolean
getCenterPages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Get a boolean indicating wheter the page must be centralized.int
getChannelTreeCount(String rootChannelId, ITransaction transaction)
Returns the number of channels in the tree for which the root is the given channelId.List<String>
getChannelTreeIds(String rootChannelId, boolean includeIgnoredOnImportExportChannels, ITransaction transaction)
Returns all the ids of channels in the tree for which the root is the given channelId.List<String>
getChannelTreeIds(String rootChannelId, ITransaction transaction)
Returns all the ids of channels in the tree for which the root is the given channelId.List<String>
getCssIds(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get a list of CSS Ids of the Channel.List<String>
getCssIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get a list of Css Ids of the Channel including inherited Css.String
getFriendlyPath(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get the friendly path of a channel.Collection<String>
getIdsByPageTemplateId(SessionConfig sessionConfig, String pageTemplateId, ITransaction transaction)
Retrieves the Ids of all channel that uses the specified page template as default page templateList<String>
getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get a list of sub channel's id given the parent Channel's id.List<String>
getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction)
Retrieves the Ids of all channel that uses the specified channel template.int
getLayoutPagesType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Get a the page layout format.List<String>
getMetaTagIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get a list of meta-tags ids of the Channel including inherit Meta-tag.String
getPageTemplateIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Returns the PageTemplateId for the specified channel (local or inherited from a parent channel)String
getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Returns the defaultIPageWebResourceDataProvider
class name for the child pages of a channel.String
getPath(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction)
Get the full path of the Channel.String
getPath(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get the full path of the Channel.List<String>
getPathIds(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get Ids of channel and its parents.List<String>
getPathNames(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction)
Returns a list of strings each representing the name of the channel between the root portal channel and the channel solicited.int
getProtocolType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Returns the protocolType of the given channel.String
getRuntimeDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Deprecated.boolean
isCacheEnabled(WebResource webResource)
Returns if the cache is enabled for a web resource.boolean
isGoogleAnalyticsEnabled(ChannelConfig channelConfig)
Returns whether the Google Analytics is enable in the given channel.Boolean
isGoogleAnalyticsEnabledLocal(ChannelConfig channelConfig)
Returns whether the Google Analytics is enable in the given channel ornull
if this property is inherited.IChannelManagerSPI.IgnoreOnExportImportResult
isIgnoreOnExportImport(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Returns the result of a given channel ignoring.boolean
isInsideChannelTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Returns whether a channel is inside a channel template or if it is the channel template root itself.boolean
keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
Checks if configId matches an already persisted objectboolean
requiresFriendlyPathUpdate(WebResource webResource)
Returns whether the friendly path for the given web resource requires updating.void
serialize(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction)
void
serializeCss(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction)
void
setGoogleAnalyticsEnable(Boolean enabled, ChannelConfig channelConfig)
Sets whether the Google Analytics is enable in the given channel.void
setPageCacheFilePath(PageCacheConfig pageCacheConfig)
Sets the file path for aPageCacheConfig
.void
setWebResourcesMissingData(String resourceId, boolean processChildren)
Sets missing data in the web resources of the specified resource.void
update(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Update the Channel.void
updateLocalGroupPrefixFromFriendlyId(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Updates the local group prefix of the given channel with its friendly identifier.void
validateFriendlyId(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Validates the channel's friendly identifier.
-
-
-
Method Detail
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Add or Update a Channel, depending on its previous existence.- Specified by:
addOrUpdate
in interfaceIChannelManager
- Throws:
ManagerException
PortalException
-
add
public String add(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Add a Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission in the parent channel.- Specified by:
add
in interfaceIChannelManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
validateFriendlyId
public void validateFriendlyId(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManagerSPI
Validates the channel's friendly identifier. If the validation is not successful, an exception is thrown.- Specified by:
validateFriendlyId
in interfaceIChannelManagerSPI
- Parameters:
sessionConfig
- the user's session information.channelConfig
- the channel to be validated.transaction
- the transaction to use.- Throws:
PortalException
-
update
public void update(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManager
Update the Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission.- Specified by:
update
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
copy
public String copy(SessionConfig sessionConfig, String sourceChannelId, String destinationParentChannelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Creates a new channel by copying source channel's properties and structure into destination's parent channel. Does not allow the creation of a new Channel based on the "Portal" channel.- Specified by:
copy
in interfaceIChannelManager
- Returns:
- Throws:
ManagerException
PortalException
-
get
public ChannelConfig get(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get the Channel's configuration. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Specified by:
get
in interfaceIChannelManager
- Parameters:
sessionConfig
- the user's session information.channelId
- the channelId.transaction
- the transaction for persistence access.- Returns:
- the channel.
- Throws:
PortalObjectNotFoundException
- if the channel was not found.ManagerException
PortalException
-
delete
public void delete(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Delete the Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission.- Specified by:
delete
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
disconnectChannelsFromTemplatesRecursively
protected void disconnectChannelsFromTemplatesRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
deleteRecursively
protected void deleteRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
getIdsByParentChannelId
public List<String> getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManager
Get a list of sub channel's id given the parent Channel's id. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Specified by:
getIdsByParentChannelId
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- an array of strings.
- Throws:
ManagerException
PortalException
-
getPath
public String getPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get the full path of the Channel. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Specified by:
getPath
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getPath
public String getPath(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get the full path of the Channel. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Specified by:
getPath
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.localizable
- TODO- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getPathNames
public List<String> getPathNames(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Returns a list of strings each representing the name of the channel between the root portal channel and the channel solicited.The first element of the list is the root portal channel followed by its children in hierarchical order.
- Specified by:
getPathNames
in interfaceIChannelManager
- Parameters:
sessionConfig
- session config of a userchannelId
- identifier of the channel for which you want the path nameslocalizable
- if true, the channel names are localized- Returns:
- Throws:
ManagerException
PortalException
-
getFriendlyPath
public String getFriendlyPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get the friendly path of a channel. The friendly path is generated according to the configuration in the channel.- Specified by:
getFriendlyPath
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user. the identification of the user.channelId
- the identification of the channel.transaction
- the transaction for persistence access.- Returns:
- the generated path.
- Throws:
ManagerException
PortalException
- See Also:
ChannelConfig.FRIENDLY_PATH_TYPE_CHANNEL_NAME
,ChannelConfig.FRIENDLY_PATH_TYPE_INHERIT
,ChannelConfig.FRIENDLY_PATH_TYPE_USER_DEFINED
-
getPathIds
public List<String> getPathIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get Ids of channel and its parents. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Specified by:
getPathIds
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
addCssLink
public void addCssLink(SessionConfig sessionConfig, String channelId, String cssId, int position, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Add the hyperlink to the channel's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Specified by:
addCssLink
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
deleteCssLink
public void deleteCssLink(SessionConfig sessionConfig, String channelId, String cssId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Delete the hyperlink to the channel's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Specified by:
deleteCssLink
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
getCssIds
public List<String> getCssIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get a list of CSS Ids of the Channel.- Specified by:
getCssIds
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
getCssIdsRecursively
public List<String> getCssIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get a list of Css Ids of the Channel including inherited Css.- Specified by:
getCssIdsRecursively
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
getMetaTagIdsRecursively
public List<String> getMetaTagIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get a list of meta-tags ids of the Channel including inherit Meta-tag.- Specified by:
getMetaTagIdsRecursively
in interfaceIChannelManager
- Returns:
- Throws:
ManagerException
PortalException
-
getCenterPages
public boolean getCenterPages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get a boolean indicating wheter the page must be centralized.- Specified by:
getCenterPages
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- Throws:
ManagerException
PortalException
-
getLayoutPagesType
public int getLayoutPagesType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Get a the page layout format.The return would be one of
PageConfig.PAGE_LAYOUT_INHERIT
,PageConfig.PAGE_LAYOUT_WITH_TABLES
orPageConfig.PAGE_LAYOUT_WITH_TABLELESS
- Specified by:
getLayoutPagesType
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- the layout format.
- Throws:
ManagerException
PortalException
-
getCachePages
public int getCachePages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getCachePages
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- an integer.
- Throws:
ManagerException
PortalException
-
getProtocolType
public int getProtocolType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Returns the protocolType of the given channel.This method checks recursively up the channel´s ancestors until it finds a protocolType that is not
PageConfig.PAGE_PROTOCOL_INHERIT
.Possible protocol types are:
PageConfig.PAGE_PROTOCOL_HTTP
PageConfig.PAGE_PROTOCOL_HTTPS
PageConfig.PAGE_PROTOCOL_ALL
- Specified by:
getProtocolType
in interfaceIChannelManager
- Returns:
- Throws:
ManagerException
PortalException
-
serialize
public void serialize(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serialize
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
deserialize
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserialize
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
deserializeSecondPass
public void deserializeSecondPass(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Perfoms the second pass of the channels deserialization- Specified by:
deserializeSecondPass
in interfaceIChannelManager
- Parameters:
sessionConfig
- user session information.deserializationConfig
- deserialization configuration.channelNode
- the data for the channel to be imported.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
serializeCss
public void serializeCss(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serializeCss
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
deserializeCss
public void deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserializeCss
in interfaceIChannelManager
- Parameters:
sessionConfig
- The session information of the user.- Throws:
ManagerException
PortalException
-
getIdsByParentTemplateId
public List<String> getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Retrieves the Ids of all channel that uses the specified channel template.- Specified by:
getIdsByParentTemplateId
in interfaceIChannelManager
- Returns:
- Throws:
ManagerException
PortalException
-
clearCache
public void clearCache(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Clear the Channel cache.This method clears the following caches
- Channel Config
- Channel ACL
- Service Instance Configs
- Pages caches calling the page manager
- Sub-channels recursivelly
If there are subchannels to which the user does not have access, these channels and their subchannels are skipped.
- Specified by:
clearCache
in interfaceIChannelManager
- Throws:
ManagerException
PortalException
-
getPageTemplateIdRecursively
public String getPageTemplateIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManager
Returns the PageTemplateId for the specified channel (local or inherited from a parent channel)- Specified by:
getPageTemplateIdRecursively
in interfaceIChannelManager
- Returns:
- Throws:
PortalException
-
getChannelTreeCount
public int getChannelTreeCount(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Returns the number of channels in the tree for which the root is the given channelId.- Specified by:
getChannelTreeCount
in interfaceIChannelManager
- Parameters:
rootChannelId
- root channel identifier- Returns:
- Throws:
ManagerException
PortalException
-
getChannelTreeIds
public List<String> getChannelTreeIds(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Returns all the ids of channels in the tree for which the root is the given channelId.- Specified by:
getChannelTreeIds
in interfaceIChannelManager
- Parameters:
rootChannelId
- root channel identifier- Returns:
- Throws:
ManagerException
PortalException
-
getChannelTreeIds
public List<String> getChannelTreeIds(String rootChannelId, boolean includeIgnoredOnImportExportChannels, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManagerSPI
Returns all the ids of channels in the tree for which the root is the given channelId.- Specified by:
getChannelTreeIds
in interfaceIChannelManagerSPI
- Parameters:
rootChannelId
- root channel identifier.includeIgnoredOnImportExportChannels
- indicates whether the ignored channels on export and import should be ignored.transaction
- the transaction.- Returns:
- all the ids of channels in the tree for which the root is the given channelId.
- Throws:
ManagerException
PortalException
-
getIdsByPageTemplateId
public Collection<String> getIdsByPageTemplateId(SessionConfig sessionConfig, String pageTemplateId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Retrieves the Ids of all channel that uses the specified page template as default page template- Specified by:
getIdsByPageTemplateId
in interfaceIChannelManager
- Returns:
- Throws:
ManagerException
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
-
getRuntimeDataProviderClassName
@Deprecated public String getRuntimeDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
Deprecated.Description copied from interface:IChannelManager
Returns the runtime data provider class name for the child pages. This method recursively traverses up a channel tree starting from the given channel until the first channel that does not inherit the runtime data provider property. Based on the runtime data provider type, either a standard or customized page runtime data provider class name is returned.- Specified by:
getRuntimeDataProviderClassName
in interfaceIChannelManager
- Parameters:
sessionConfig
- current user sessionchannelConfig
- channel configurationtransaction
- current transaction- Returns:
- class name of the data provider class
- Throws:
PortalException
-
getPageWebResourceDataProviderClassName
public String getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManager
Returns the defaultIPageWebResourceDataProvider
class name for the child pages of a channel.This method recursively traverses up a channel tree starting from the given channel until the first channel that does not inherit the data provider property. Based on the page web resource data provider type, either a standard or customized page web resource data provider class name is returned.
- Specified by:
getPageWebResourceDataProviderClassName
in interfaceIChannelManager
- Parameters:
sessionConfig
- user session information.channelConfig
- the channel.transaction
- the transaction for persistence access.- Returns:
- full qualified name of the data provider class.
- Throws:
PortalException
-
createWebResourceByDynamicPath
public WebResource createWebResourceByDynamicPath(String dynamicPath) throws PortalException
Description copied from interface:IWebResourceFactory
Creates aWebResource
instance based on a dynamic path.- Specified by:
createWebResourceByDynamicPath
in interfaceIWebResourceFactory
- Parameters:
dynamicPath
- the dynamic path.- Returns:
- the web resource.
- Throws:
PortalException
- Since:
- 5.0.0
-
setPageCacheFilePath
public void setPageCacheFilePath(PageCacheConfig pageCacheConfig) throws PortalException
Description copied from interface:IWebResourceFactory
Sets the file path for aPageCacheConfig
.- Specified by:
setPageCacheFilePath
in interfaceIWebResourceFactory
- Parameters:
pageCacheConfig
- the page cache.- Throws:
PortalException
- Since:
- 5.0.0
-
isCacheEnabled
public boolean isCacheEnabled(WebResource webResource) throws PortalException
Description copied from interface:IWebResourceFactory
Returns if the cache is enabled for a web resource.- Specified by:
isCacheEnabled
in interfaceIWebResourceFactory
- Parameters:
webResource
- the web resource.- Returns:
true
if the cache is enabled,false
otherwise.- Throws:
PortalException
-
setWebResourcesMissingData
public void setWebResourcesMissingData(String resourceId, boolean processChildren) throws PortalException
Description copied from interface:IWebResourceFactory
Sets missing data in the web resources of the specified resource.- Specified by:
setWebResourcesMissingData
in interfaceIWebResourceFactory
- Parameters:
resourceId
- the resource owner of the web resources.processChildren
- indicates if web resources of children resources should also be processed.- Throws:
PortalException
-
adjustResolvedFriendlyPath
public String adjustResolvedFriendlyPath(WebResource webResource, String friendlyPath)
Description copied from interface:IWebResourceFactory
Adjusts a friendly path that has been resolved for a web resource.- Specified by:
adjustResolvedFriendlyPath
in interfaceIWebResourceFactory
- Parameters:
webResource
- the web resource.friendlyPath
- the resolved friendly path.- Returns:
- the adjusted friendly path value.
-
adjustFriendlyPathForClash
public String adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, String suffix)
Description copied from interface:IWebResourceFactory
Adjusts a friendly path due to clash.- Specified by:
adjustFriendlyPathForClash
in interfaceIWebResourceFactory
- Parameters:
originalFriendlyPath
- the original friendly path resolved.clashedFriendlyPath
- the last clashed friendly path value.- Returns:
- the adjusted friendly path value.
-
requiresFriendlyPathUpdate
public boolean requiresFriendlyPathUpdate(WebResource webResource)
Description copied from interface:IWebResourceFactory
Returns whether the friendly path for the given web resource requires updating.- Specified by:
requiresFriendlyPathUpdate
in interfaceIWebResourceFactory
- Parameters:
webResource
- the web resource.- Returns:
true
if update is required,false
otherwise.
-
isIgnoreOnExportImport
public IChannelManagerSPI.IgnoreOnExportImportResult isIgnoreOnExportImport(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Description copied from interface:IChannelManagerSPI
Returns the result of a given channel ignoring.- Specified by:
isIgnoreOnExportImport
in interfaceIChannelManagerSPI
- Parameters:
sessionConfig
- the user's session.channelId
- the channel identifier.transaction
- the transaction.- Returns:
- the result of a given channel ignoring.
- Throws:
PortalException
-
isGoogleAnalyticsEnabledLocal
public Boolean isGoogleAnalyticsEnabledLocal(ChannelConfig channelConfig) throws PortalException
Description copied from interface:IChannelManagerSPI
Returns whether the Google Analytics is enable in the given channel ornull
if this property is inherited.- Specified by:
isGoogleAnalyticsEnabledLocal
in interfaceIChannelManagerSPI
- Parameters:
channelConfig
- the channel the information will be read from.- Returns:
- whether the Google Analytics is enable in the given channel or
null
if this property is inherited. - Throws:
PortalException
-
isGoogleAnalyticsEnabled
public boolean isGoogleAnalyticsEnabled(ChannelConfig channelConfig) throws PortalException
Description copied from interface:IChannelManagerSPI
Returns whether the Google Analytics is enable in the given channel.- Specified by:
isGoogleAnalyticsEnabled
in interfaceIChannelManagerSPI
- Parameters:
channelConfig
- the channel the information will be read from.- Returns:
- whether the Google Analytics is enable in the given channel.
- Throws:
PortalException
-
setGoogleAnalyticsEnable
public void setGoogleAnalyticsEnable(Boolean enabled, ChannelConfig channelConfig) throws PortalException
Description copied from interface:IChannelManagerSPI
Sets whether the Google Analytics is enable in the given channel.- Specified by:
setGoogleAnalyticsEnable
in interfaceIChannelManagerSPI
- Parameters:
enabled
- the value ornull
to indicate the value should be inherited.channelConfig
- the channel the information will be set to.- Throws:
PortalException
-
isInsideChannelTemplate
public boolean isInsideChannelTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManager
Returns whether a channel is inside a channel template or if it is the channel template root itself.- Specified by:
isInsideChannelTemplate
in interfaceIChannelManager
- Parameters:
sessionConfig
- user session information.channelId
- the identifier of the channel.transaction
- the transaction for persistence access.- Returns:
true
if the channel is inside a channel template,false
otherwise.- Throws:
PortalException
PortalObjectNotFoundException
- if the channel was not found.ManagerException
-
updateLocalGroupPrefixFromFriendlyId
public void updateLocalGroupPrefixFromFriendlyId(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelManagerSPI
Updates the local group prefix of the given channel with its friendly identifier. If other channel already uses that local group prefix, a numeric suffix will be appended to the friendly identifier to generate a unique local group prefix.
This method is atomic. Thus, it will use its own transaction.- Specified by:
updateLocalGroupPrefixFromFriendlyId
in interfaceIChannelManagerSPI
- Parameters:
sessionConfig
- the user's session information.channelConfig
- the channel to be updated.transaction
- the transaction.- Throws:
ManagerException
PortalException
-
-