Interface IChannelManager
-
- All Superinterfaces:
IConfigKeyChecker
- All Known Subinterfaces:
IChannelManagerSPI
- All Known Implementing Classes:
ChannelManager
@StableMinor(version="17.0", sinceVersion="4.0") public interface IChannelManager extends IConfigKeyChecker
Manager responsible for channel-related operations- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
add(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Add a Channel.void
addCssLink(SessionConfig sessionConfig, java.lang.String channelId, java.lang.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, java.lang.String channelId, ITransaction transaction)
Clear the Channel cache.java.lang.String
copy(SessionConfig sessionConfig, java.lang.String sourceChannelId, java.lang.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, java.lang.String channelId, ITransaction transaction)
Delete the Channel.void
deleteCssLink(SessionConfig sessionConfig, java.lang.String channelId, java.lang.String cssId, ITransaction transaction)
Delete the hyperlink to the channel's CSS file.java.lang.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node channelNode, ITransaction transaction)
void
deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node cssLinksNodes, ITransaction transaction)
void
deserializeSecondPass(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node channelNode, ITransaction transaction)
Perfoms the second pass of the channels deserializationChannelConfig
get(SessionConfig sessionConfig, java.lang.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(java.lang.String rootChannelId, ITransaction transaction)
Returns the number of channels in the tree for which the root is the given channelId.java.util.List<java.lang.String>
getChannelTreeIds(java.lang.String rootChannelId, ITransaction transaction)
Returns all the ids of channels in the tree for which the root is the given channelId.java.util.List<java.lang.String>
getCssIds(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get a list of CSS Ids of the Channel.java.util.List<java.lang.String>
getCssIdsRecursively(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get a list of Css Ids of the Channel including inherited Css.java.lang.String
getFriendlyPath(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get the friendly path of a channel.java.util.Collection<java.lang.String>
getIdsByPageTemplateId(SessionConfig sessionConfig, java.lang.String pageTemplateId, ITransaction transaction)
Retrieves the Ids of all channel that uses the specified page template as default page templatejava.util.List<java.lang.String>
getIdsByParentChannelId(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get a list of sub channel's id given the parent Channel's id.java.util.List<java.lang.String>
getIdsByParentTemplateId(SessionConfig sessionConfig, java.lang.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.java.util.List<java.lang.String>
getMetaTagIdsRecursively(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get a list of meta-tags ids of the Channel including inherit Meta-tag.java.lang.String
getPageTemplateIdRecursively(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Returns the PageTemplateId for the specified channel (local or inherited from a parent channel)java.lang.String
getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Returns the defaultIPageWebResourceDataProvider
class name for the child pages of a channel.java.lang.String
getPath(SessionConfig sessionConfig, java.lang.String channelId, boolean localizable, ITransaction transaction)
Get the full path of the Channel.java.lang.String
getPath(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get the full path of the Channel.java.util.List<java.lang.String>
getPathIds(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get Ids of channel and its parents.java.util.List<java.lang.String>
getPathNames(SessionConfig sessionConfig, java.lang.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.java.lang.String
getRuntimeDataProviderClassName(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderClassName(SessionConfig, ChannelConfig, ITransaction)
.boolean
isInsideChannelTemplate(SessionConfig sessionConfig, java.lang.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, java.lang.String channelId, java.io.OutputStream outputStream, ITransaction transaction)
void
serializeCss(SessionConfig sessionConfig, java.lang.String channelId, java.io.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
java.lang.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
java.lang.String copy(SessionConfig sessionConfig, java.lang.String sourceChannelId, java.lang.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, java.lang.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, java.lang.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
java.lang.String getPath(SessionConfig sessionConfig, java.lang.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
java.lang.String getPath(SessionConfig sessionConfig, java.lang.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
java.lang.String getFriendlyPath(SessionConfig sessionConfig, java.lang.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
java.util.List<java.lang.String> getIdsByParentChannelId(SessionConfig sessionConfig, java.lang.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
java.util.List<java.lang.String> getPathIds(SessionConfig sessionConfig, java.lang.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, java.lang.String channelId, java.lang.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, java.lang.String channelId, java.lang.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
java.util.List<java.lang.String> getCssIds(SessionConfig sessionConfig, java.lang.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
java.util.List<java.lang.String> getCssIdsRecursively(SessionConfig sessionConfig, java.lang.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
java.util.List<java.lang.String> getMetaTagIdsRecursively(SessionConfig sessionConfig, java.lang.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, java.lang.String channelId, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.channelId
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserialize
java.lang.String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.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, org.w3c.dom.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, java.lang.String channelId, java.io.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, org.w3c.dom.Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
- The session information of the user.deserializationConfig
-cssLinksNodes
-transaction
-- Throws:
ManagerException
PortalException
-
getIdsByParentTemplateId
java.util.List<java.lang.String> getIdsByParentTemplateId(SessionConfig sessionConfig, java.lang.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, java.lang.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
java.util.Collection<java.lang.String> getIdsByPageTemplateId(SessionConfig sessionConfig, java.lang.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
java.lang.String getPageTemplateIdRecursively(SessionConfig sessionConfig, java.lang.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(java.lang.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
java.util.List<java.lang.String> getChannelTreeIds(java.lang.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
java.util.List<java.lang.String> getPathNames(SessionConfig sessionConfig, java.lang.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 java.lang.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
java.lang.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, java.lang.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
-
-