lumis.portal.channel
Class ChannelManager

Package class diagram package ChannelManager
java.lang.Object
  extended by 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

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.
 String adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, int numRetry)
          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 a WebResource 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 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.
 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 default IPageWebResourceDataProvider 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 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 setPageCacheFilePath(PageCacheConfig pageCacheConfig)
          Sets the file path for a PageCacheConfig.
 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 validateFriendlyId(SessionConfig sessionConfig, ChannelConfig channelConfig, ITransaction transaction)
          Validates the channel's friendly identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelManager

public ChannelManager()
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManagerSPI
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
Parameters:
sessionConfig - session config of a user
channelId - identifier of the channel for which you want the path names
localizable - 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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 or PageConfig.PAGE_LAYOUT_WITH_TABLELESS

Specified by:
getLayoutPagesType in interface IChannelManager
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 interface IChannelManager
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:

Specified by:
getProtocolType in interface IChannelManager
Returns:
Throws:
ManagerException
PortalException

serialize

public void serialize(SessionConfig sessionConfig,
                      String channelId,
                      OutputStream outputStream,
                      ITransaction transaction)
               throws ManagerException,
                      PortalException
Specified by:
serialize in interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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

If the channel being cleared is the Portal Channel, the string cache will also be cleared.

If there are subchannels to which the user does not have access, these channels and their subchannels are skipped.

Specified by:
clearCache in interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
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 interface IChannelManager
Parameters:
rootChannelId - root channel identifier
Returns:
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 interface IChannelManager
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 interface IConfigKeyChecker
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 interface IChannelManager
Parameters:
sessionConfig - current user session
channelConfig - channel configuration
transaction - 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 default IPageWebResourceDataProvider 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 interface IChannelManager
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 a WebResource instance based on a dynamic path.

Specified by:
createWebResourceByDynamicPath in interface IWebResourceFactory
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 a PageCacheConfig.

Specified by:
setPageCacheFilePath in interface IWebResourceFactory
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 interface IWebResourceFactory
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 interface IWebResourceFactory
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 interface IWebResourceFactory
Parameters:
webResource - the web resource.
friendlyPath - the resolved friendly path.
Returns:
the adjusted friendly path value.

adjustFriendlyPathForClash

public String adjustFriendlyPathForClash(String originalFriendlyPath,
                                         String clashedFriendlyPath,
                                         int numRetry)
Description copied from interface: IWebResourceFactory
Adjusts a friendly path due to clash.

Specified by:
adjustFriendlyPathForClash in interface IWebResourceFactory
Parameters:
originalFriendlyPath - the original friendly path resolved.
clashedFriendlyPath - the last clashed friendly path value.
numRetry - the number of retry for adjust clashing for this friendly path. In each call to this method for resolving a single friendly path this value is incremented.
Returns:
the adjusted friendly path value.


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.