Package lumis.portal.channel.template
Class ChannelTemplateManager
- java.lang.Object
-
- lumis.portal.channel.template.ChannelTemplateManager
-
- All Implemented Interfaces:
IChannelTemplateManager
public class ChannelTemplateManager extends Object implements IChannelTemplateManager
Implements the management of channel template information.- Since:
- 4.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description ChannelTemplateManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
addChannelLink(SessionConfig sessionConfig, ChannelTemplateLinkConfig channelTemplateLinkConfig, ITransaction transaction)
Add a channel's link.void
deleteChannelLink(SessionConfig sessionConfig, String channelLinkId, ITransaction transaction)
Delete a specific channel's link by pass channelLinkId.void
deleteChannelLinks(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Delete all channel's links by pass channelId.String
deserializeChannelTemplateLink(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node linkNode, ITransaction transaction)
Deserializes the channel template link in the given node.void
disconnectFromTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction)
This method disconnects the specific channel from the channel's template.ChannelTemplateLinkConfig
getChannelLinkBySourceId(SessionConfig sessionConfig, String channelId, String sourceId, boolean getLinkedElementsOnly, ITransaction transaction)
This method return the channel's link by pass the channelId and the sourceId parameters.List<ChannelTemplateLinkConfig>
getChannelLinks(SessionConfig sessionConfig, String channelId, boolean getLinkedElementsOnly, ITransaction transaction)
This method return channel's links by pass the channelId parameter.void
serializeChannelTemplateLinks(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction)
Serializes the channel template links of a single channel.protected void
updateChannelStructureFromTemplate(SessionConfig sessionConfig, String channelId, String channelTemplateId, Document templateDocument, ITransaction transaction)
Updates a channel structure using the given template document.void
updateChannelStructureFromTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction)
This method updates the channel's structure from the channel template.
-
-
-
Method Detail
-
updateChannelStructureFromTemplate
public void updateChannelStructureFromTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
This method updates the channel's structure from the channel template.- Specified by:
updateChannelStructureFromTemplate
in interfaceIChannelTemplateManager
- Throws:
ManagerException
PortalException
-
updateChannelStructureFromTemplate
protected void updateChannelStructureFromTemplate(SessionConfig sessionConfig, String channelId, String channelTemplateId, Document templateDocument, ITransaction transaction) throws ManagerException, PortalException
Updates a channel structure using the given template document.- Parameters:
sessionConfig
- a session configurationchannelId
- the channel to be updatedchannelTemplateId
- the channel templatetemplateDocument
- the serialized channel template documenttransaction
- a transaction- Throws:
ManagerException
PortalException
- Since:
- 5.6.0
-
disconnectFromTemplate
public void disconnectFromTemplate(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
This method disconnects the specific channel from the channel's template.- Specified by:
disconnectFromTemplate
in interfaceIChannelTemplateManager
- Throws:
ManagerException
PortalException
-
getChannelLinks
public List<ChannelTemplateLinkConfig> getChannelLinks(SessionConfig sessionConfig, String channelId, boolean getLinkedElementsOnly, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
This method return channel's links by pass the channelId parameter. If the parameter getLinkedElementsOnly is true the method returns only the links is enable. If the parameter is false it returns all links.- Specified by:
getChannelLinks
in interfaceIChannelTemplateManager
- Returns:
- Returns the channel's links.
- Throws:
ManagerException
PortalException
-
getChannelLinkBySourceId
public ChannelTemplateLinkConfig getChannelLinkBySourceId(SessionConfig sessionConfig, String channelId, String sourceId, boolean getLinkedElementsOnly, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
This method return the channel's link by pass the channelId and the sourceId parameters. If the parameter getLinkedElementsOnly is true the method returns only the links is enable. If the parameter is false it returns all links.- Specified by:
getChannelLinkBySourceId
in interfaceIChannelTemplateManager
- Returns:
- Returns the channel link.
- Throws:
ManagerException
PortalException
-
addChannelLink
public String addChannelLink(SessionConfig sessionConfig, ChannelTemplateLinkConfig channelTemplateLinkConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
Add a channel's link.- Specified by:
addChannelLink
in interfaceIChannelTemplateManager
- Returns:
- Returns the Id of the channelTemplateLinkConfig.
- Throws:
ManagerException
PortalException
-
deleteChannelLink
public void deleteChannelLink(SessionConfig sessionConfig, String channelLinkId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
Delete a specific channel's link by pass channelLinkId.- Specified by:
deleteChannelLink
in interfaceIChannelTemplateManager
- Throws:
ManagerException
PortalException
-
deleteChannelLinks
public void deleteChannelLinks(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
Delete all channel's links by pass channelId.- Specified by:
deleteChannelLinks
in interfaceIChannelTemplateManager
- Throws:
ManagerException
PortalException
-
serializeChannelTemplateLinks
public void serializeChannelTemplateLinks(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
Serializes the channel template links of a single channel.- Specified by:
serializeChannelTemplateLinks
in interfaceIChannelTemplateManager
- Parameters:
sessionConfig
- the user session information.channelId
- the channel id.outputStream
- the outputstream to serialize the data to.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
deserializeChannelTemplateLink
public String deserializeChannelTemplateLink(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node linkNode, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IChannelTemplateManager
Deserializes the channel template link in the given node.- Specified by:
deserializeChannelTemplateLink
in interfaceIChannelTemplateManager
- Parameters:
sessionConfig
- the user session information.deserializationConfig
- deserialization configuration.linkNode
- the node containing the channel template link information.transaction
- the transaction for persistence access.- Returns:
- the deserialized channel template link id.
- Throws:
ManagerException
PortalException
-
-