Interface IChannelManager
-
- All Superinterfaces:
IConfigKeyChecker
- All Known Subinterfaces:
IChannelManagerSPI
- All Known Implementing Classes:
ChannelManager
@StableMinor(version="14.2", sinceVersion="4.0") public interface IChannelManager extends IConfigKeyChecker
Manager responsible for channel-related operations- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Method Summary
All Methods Instance Methods Abstract 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.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.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.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 deserializationChannelConfig
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, 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.Since 5.0.0 replaced bygetPageWebResourceDataProviderClassName(SessionConfig, ChannelConfig, ITransaction)
.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.void
serialize(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction)
void
serializeCss(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction)
void
update(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Update the Channel.-
Methods inherited from interface lumis.portal.serialization.operation.IConfigKeyChecker
keyExists
-
-
-
-
Method Detail
-
addOrUpdate
void addOrUpdate(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Add or Update a Channel, depending on its previous existence.- Parameters:
sessionConfig
-channelConfig
-transaction
-- Throws:
ManagerException
PortalException
-
add
String add(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Add a Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission in the parent channel.- Parameters:
sessionConfig
-channelConfig
-transaction
-- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
copy
String copy(SessionConfig sessionConfig, String sourceChannelId, String destinationParentChannelId, ITransaction transaction) throws ManagerException, PortalException
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.- Parameters:
sessionConfig
-sourceChannelId
-destinationParentChannelId
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
-
get
ChannelConfig get(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get the Channel's configuration. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- 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
void delete(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Delete the Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Throws:
ManagerException
PortalException
-
update
void update(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Update the Channel. To access this method, the user needs the PERMISSION_TYPE_FULL_CONTROL permission.- Parameters:
sessionConfig
- The session information of the user.channelConfig
-transaction
-- Throws:
ManagerException
PortalException
-
getPath
String getPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get the full path of the Channel. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getPath
String getPath(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
Get the full path of the Channel. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-localizable
- TODOtransaction
-- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getFriendlyPath
String getFriendlyPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get the friendly path of a channel. The friendly path is generated according to the configuration in the channel.- 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
-
getIdsByParentChannelId
List<String> getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
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.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Returns:
- an array of strings.
- Throws:
ManagerException
PortalException
-
getPathIds
List<String> getPathIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get Ids of channel and its parents. To access this method, the user needs the PERMISSION_TYPE_VIEW_CHANNEL permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
addCssLink
void addCssLink(SessionConfig sessionConfig, String channelId, String cssId, int position, ITransaction transaction) throws ManagerException, PortalException
Add the hyperlink to the channel's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-cssId
-position
-transaction
-- Throws:
ManagerException
PortalException
-
deleteCssLink
void deleteCssLink(SessionConfig sessionConfig, String channelId, String cssId, ITransaction transaction) throws ManagerException, PortalException
Delete the hyperlink to the channel's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Parameters:
sessionConfig
- The session information of the user.channelId
-cssId
-transaction
-- Throws:
ManagerException
PortalException
-
getCssIds
List<String> getCssIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get a list of CSS Ids of the Channel.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
getCssIdsRecursively
List<String> getCssIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get a list of Css Ids of the Channel including inherited Css.- Parameters:
sessionConfig
- The session information of the user.channelId
-transaction
-- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
getMetaTagIdsRecursively
List<String> getMetaTagIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get a list of meta-tags ids of the Channel including inherit Meta-tag.- Parameters:
sessionConfig
-channelId
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getCenterPages
boolean getCenterPages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
Get a boolean indicating wheter the page must be centralized.- Parameters:
sessionConfig
- The session information of the user.channelConfig
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getLayoutPagesType
int getLayoutPagesType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
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
- Parameters:
sessionConfig
- The session information of the user.channelConfig
-transaction
-- Returns:
- the layout format.
- Throws:
ManagerException
PortalException
-
getCachePages
int getCachePages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.channelConfig
-transaction
-- Returns:
- an integer.
- Throws:
ManagerException
PortalException
-
serialize
void serialize(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.channelId
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserialize
String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.deserializationConfig
-channelNode
-transaction
-- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
deserializeSecondPass
void deserializeSecondPass(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
Perfoms the second pass of the channels deserialization- 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
void serializeCss(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.channelId
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserializeCss
void deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.deserializationConfig
-cssLinksNodes
-transaction
-- Throws:
ManagerException
PortalException
-
getIdsByParentTemplateId
List<String> getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction) throws ManagerException, PortalException
Retrieves the Ids of all channel that uses the specified channel template.- Parameters:
sessionConfig
-parentTemplateId
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
- Since:
- 4.0.4
-
clearCache
void clearCache(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
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.
- Parameters:
sessionConfig
-channelId
-transaction
-- Throws:
ManagerException
PortalException
- Since:
- 4.0.4
-
getIdsByPageTemplateId
Collection<String> getIdsByPageTemplateId(SessionConfig sessionConfig, String pageTemplateId, ITransaction transaction) throws ManagerException, PortalException
Retrieves the Ids of all channel that uses the specified page template as default page template- Parameters:
sessionConfig
-pageTemplateId
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
- Since:
- 4.0.8
-
getPageTemplateIdRecursively
String getPageTemplateIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Returns the PageTemplateId for the specified channel (local or inherited from a parent channel)- Parameters:
sessionConfig
-channelId
-transaction
-- Returns:
- Throws:
PortalException
- Since:
- 4.0.6
-
getChannelTreeCount
int getChannelTreeCount(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
Returns the number of channels in the tree for which the root is the given channelId.- Parameters:
rootChannelId
- root channel identifiertransaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getChannelTreeIds
List<String> getChannelTreeIds(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
Returns all the ids of channels in the tree for which the root is the given channelId.- Parameters:
rootChannelId
- root channel identifiertransaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getPathNames
List<String> getPathNames(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
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.
- Parameters:
sessionConfig
- session config of a userchannelId
- identifier of the channel for which you want the path nameslocalizable
- if true, the channel names are localizedtransaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getProtocolType
int getProtocolType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
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
- Parameters:
sessionConfig
-channelConfig
-transaction
-- Returns:
- Throws:
ManagerException
PortalException
-
getRuntimeDataProviderClassName
@Deprecated String getRuntimeDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderClassName(SessionConfig, ChannelConfig, ITransaction)
.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.- Parameters:
sessionConfig
- current user sessionchannelConfig
- channel configurationtransaction
- current transaction- Returns:
- class name of the data provider class
- Throws:
PortalException
- Since:
- 4.2.0
-
getPageWebResourceDataProviderClassName
String getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws PortalException
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.
- 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
- Since:
- 5.0.0
-
isInsideChannelTemplate
boolean isInsideChannelTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Returns whether a channel is inside a channel template or if it is the channel template root itself.- 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.- Since:
- 11.0.0
-
-