|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.channel.ChannelManager
public class ChannelManager
Implementation for the channel manager.
Constructor Summary | |
---|---|
ChannelManager()
|
Method Summary | |
---|---|
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. |
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 deserialization |
protected 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,
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 template |
List<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. |
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 |
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. |
boolean |
keyExists(SessionConfig sessionConfig,
Object configKey,
Object config,
ITransaction transaction)
Checks if configId matches an already persisted object |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChannelManager()
Method Detail |
---|
public void addOrUpdate(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
addOrUpdate
in interface IChannelManager
ManagerException
PortalException
public String add(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
add
in interface IChannelManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
update
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public String copy(SessionConfig sessionConfig, String sourceChannelId, String destinationParentChannelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
copy
in interface IChannelManager
ManagerException
PortalException
public ChannelConfig get(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
get
in interface IChannelManager
sessionConfig
- the user's session information.channelId
- the channelId.transaction
- the transaction for persistence access.
PortalObjectNotFoundException
- if the channel was not found.
ManagerException
PortalException
public void delete(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
delete
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
protected void disconnectChannelsFromTemplatesRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
ManagerException
PortalException
protected void deleteRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
ManagerException
PortalException
public List<String> getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getIdsByParentChannelId
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public String getPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getPath
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public String getPath(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getPath
in interface IChannelManager
sessionConfig
- The session information of the user.localizable
- TODO
ManagerException
PortalException
public List<String> getPathNames(SessionConfig sessionConfig, String channelId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
The first element of the list is the root portal channel followed by its children in hierarchical order.
getPathNames
in interface IChannelManager
sessionConfig
- session config of a userchannelId
- identifier of the channel for which you want the path nameslocalizable
- if true, the channel names are localized
ManagerException
PortalException
public String getFriendlyPath(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getFriendlyPath
in interface IChannelManager
sessionConfig
- The session information of the user. the identification of the
user.channelId
- the identification of the channel.transaction
- the transaction for persistence access.
ManagerException
PortalException
ChannelConfig.FRIENDLY_PATH_TYPE_CHANNEL_NAME
,
ChannelConfig.FRIENDLY_PATH_TYPE_INHERIT
,
ChannelConfig.FRIENDLY_PATH_TYPE_USER_DEFINED
public List<String> getPathIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getPathIds
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public void addCssLink(SessionConfig sessionConfig, String channelId, String cssId, int position, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
addCssLink
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public void deleteCssLink(SessionConfig sessionConfig, String channelId, String cssId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
deleteCssLink
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public List<String> getCssIds(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getCssIds
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public List<String> getCssIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getCssIdsRecursively
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public List<String> getMetaTagIdsRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getMetaTagIdsRecursively
in interface IChannelManager
ManagerException
PortalException
public boolean getCenterPages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getCenterPages
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public int getCachePages(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
getCachePages
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public int getProtocolType(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
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
getProtocolType
in interface IChannelManager
ManagerException
PortalException
public void serialize(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
serialize
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
deserialize
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public void deserializeSecondPass(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node channelNode, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
deserializeSecondPass
in interface IChannelManager
sessionConfig
- user session information.deserializationConfig
- deserialization configuration.channelNode
- the data for the channel to be imported.transaction
- the transaction for persistence access.
ManagerException
PortalException
public void serializeCss(SessionConfig sessionConfig, String channelId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
serializeCss
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public void deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
deserializeCss
in interface IChannelManager
sessionConfig
- The session information of the user.
ManagerException
PortalException
public List<String> getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getIdsByParentTemplateId
in interface IChannelManager
ManagerException
PortalException
public void clearCache(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
This method clears the following caches
If there are subchannels to which the user does not have access, these channels and their subchannels are skipped.
clearCache
in interface IChannelManager
ManagerException
PortalException
public String getPageTemplateIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
IChannelManager
getPageTemplateIdRecursively
in interface IChannelManager
PortalException
public int getChannelTreeCount(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getChannelTreeCount
in interface IChannelManager
rootChannelId
- root channel identifier
ManagerException
PortalException
public List<String> getChannelTreeIds(String rootChannelId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getChannelTreeIds
in interface IChannelManager
rootChannelId
- root channel identifier
ManagerException
PortalException
public Collection<String> getIdsByPageTemplateId(SessionConfig sessionConfig, String pageTemplateId, ITransaction transaction) throws ManagerException, PortalException
IChannelManager
getIdsByPageTemplateId
in interface IChannelManager
ManagerException
PortalException
public boolean keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
IConfigKeyChecker
keyExists
in interface IConfigKeyChecker
config
- Optional, allows a checker to read aditional fields to check composed keys
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |