Class PageManager
- java.lang.Object
-
- lumis.portal.page.PageManager
-
- All Implemented Interfaces:
IPageManager
,IConfigDeleter
,IConfigKeyChecker
,IWebResourceFactory
public class PageManager extends Object implements IPageManager, IWebResourceFactory
Page manager implementation.- Since:
- 4.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description PageManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
add(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Add a page.void
addCssLink(SessionConfig sessionConfig, String pageId, String cssId, int position, ITransaction transaction)
Add the hyperlink to the page's CSS file.void
addOrUpdate(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Add or Update a Page, depending on its previous existence.String
adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, String suffix)
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 pageId, ITransaction transaction)
Clear the page cache.void
clearCache(SessionConfig sessionConfig, Collection<String> pageIds, ITransaction transaction)
Clears the cache for a group of pages.void
clearCssAndMetatagCache(String pageId, ITransaction transaction)
Clears the CSS and Metatag caches of the page with the given identifier.void
copy(SessionConfig sessionConfig, String sourcePageId, String destinationPageId, ITransaction transaction)
Copy the layout and properties from the original page to the destination page.WebResource
createWebResourceByDynamicPath(String dynamicPath)
Creates aWebResource
instance based on a dynamic path.void
delete(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Delete a page.void
deleteConfig(DeserializationContext deserializationContext, String configId)
void
deleteCssLink(SessionConfig sessionConfig, String pageId, String cssId, ITransaction transaction)
Delete the hyperlink to the page's CSS file.void
deleteOrphanInterfaces(SessionConfig sessionConfig, String pageId, ITransaction daoTransaction)
Remove any interface instance associated to the page that is not being referenced in it's layout.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, boolean firstDeserialization, ITransaction transaction)
String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, ITransaction transaction)
void
deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction)
void
disconnectFromTemplate(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Disconnect the page from its template if one existsprotected void
disconnectFromTemplate_Internal(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
PageConfig
get(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Get the configuration of the page.int
getCachePage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
boolean
getCenterPage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
List<String>
getCssIds(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Get a list of Css Ids of the page.List<String>
getCssIdsRecursively(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Get a list of Css Ids of the page including inherited Css.String
getFirstIdByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
PageConfig
getFirstPageByChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Returns the first page for a channel, including pages in sub-channels.List<String>
getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Returns all the pages that have the given channel as their parent channel.List<String>
getIdsByParentChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Collection<String>
getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction)
Collection<String>
getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction)
int
getLayoutType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Returns the layout type used for rendering the page to the end user.List<String>
getMetaTagIdsRecursively(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Get a list of Meta-Tags Ids of the page including inherited Meta-Tags.String
getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Returns theIPageWebResourceDataProvider
class name for the given page.List<String>
getParentPathIds(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Returns the Ids of parent channels recursively.String
getPath(SessionConfig sessionConfig, String pageId, boolean localizable, ITransaction transaction)
Returns the complete path beginning from the root channel to the page.String
getPath(SessionConfig sessionConfig, String pageId, ITransaction transaction)
Returns the complete path beginning from the root channel to the page.String
getProtocolScheme(SessionConfig sessionConfig, int protocolType, ITransaction transaction)
Return the protocol Scheme of the page given a protocol type.int
getProtocolType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Returns the protocolType of the given page.String
getRuntimeDataProviderClassName(SessionConfig sessionConfig, PageConfig pageConfig, 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 objectboolean
requiresFriendlyPathUpdate(WebResource webResource)
Returns whether the friendly path for the given web resource requires updating.void
serialize(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction)
void
serializeCss(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction)
void
setPageCacheFilePath(PageCacheConfig pageCache)
Sets the file path for aPageCacheConfig
.void
setWebResourcesMissingData(String resourceId, boolean processChildren)
Sets missing data in the web resources of the specified resource.void
update(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction)
Update a page.void
updateDeserializedPageLayout(SessionConfig sessionConfig, DeserializationConfig deserealizationConfig, String pageId, ITransaction transaction)
void
updateLayout(SessionConfig sessionConfig, String pageId, String layout, ITransaction transaction)
Update the page layout.void
updateSsiProperty(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction)
Updates the server side include property of the interface's page.
-
-
-
Method Detail
-
addOrUpdate
public void addOrUpdate(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Add or Update a Page, depending on its previous existence.- Specified by:
addOrUpdate
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
add
public String add(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Add a page. If the page is a page template, and its layout is null, a default layout containing an interface holder is set in the page template.- Specified by:
add
in interfaceIPageManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
get
public PageConfig get(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Get the configuration of the page.- Specified by:
get
in interfaceIPageManager
- Returns:
- a PageConfig.
- Throws:
ManagerException
PortalException
-
delete
public void delete(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Delete a page.- Specified by:
delete
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
update
public void update(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws PortalException
Description copied from interface:IPageManager
Update a page.- Specified by:
update
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
disconnectFromTemplate_Internal
protected void disconnectFromTemplate_Internal(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
disconnectFromTemplate
public void disconnectFromTemplate(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Disconnect the page from its template if one exists- Specified by:
disconnectFromTemplate
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
updateLayout
public void updateLayout(SessionConfig sessionConfig, String pageId, String layout, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Update the page layout.- Specified by:
updateLayout
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
updateSsiProperty
public void updateSsiProperty(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws PortalException
Description copied from interface:IPageManager
Updates the server side include property of the interface's page.If the server side include is to be calculated automatically, this method checks if any of the interface instances within the page have the ssi property set to true. If so the ssi property of the page is set to true.
- Specified by:
updateSsiProperty
in interfaceIPageManager
- Throws:
PortalException
-
deleteOrphanInterfaces
public void deleteOrphanInterfaces(SessionConfig sessionConfig, String pageId, ITransaction daoTransaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Remove any interface instance associated to the page that is not being referenced in it's layout.- Specified by:
deleteOrphanInterfaces
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
getPath
public String getPath(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns the complete path beginning from the root channel to the page.- Specified by:
getPath
in interfaceIPageManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
getPath
public String getPath(SessionConfig sessionConfig, String pageId, boolean localizable, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns the complete path beginning from the root channel to the page.- Specified by:
getPath
in interfaceIPageManager
- Returns:
- the path.
- Throws:
ManagerException
PortalException
-
getParentPathIds
public List<String> getParentPathIds(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns the Ids of parent channels recursively.- Specified by:
getParentPathIds
in interfaceIPageManager
- Returns:
- an array of Strings.
- Throws:
ManagerException
PortalException
-
getIdsByParentChannelId
public List<String> getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns all the pages that have the given channel as their parent channel.- Specified by:
getIdsByParentChannelId
in interfaceIPageManager
- Parameters:
sessionConfig
- The user session id must have rights to read the page listchannelId
- Id of the channeltransaction
- A transaction that should be used for acessing information from the database- Returns:
- an arrays of Strings.
- Throws:
ManagerException
PortalException
-
getFirstIdByChannelId
public String getFirstIdByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getFirstIdByChannelId
in interfaceIPageManager
- Returns:
- Throws:
ManagerException
PortalException
-
getFirstPageByChannelIdRecursively
public PageConfig getFirstPageByChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
Description copied from interface:IPageManager
Returns the first page for a channel, including pages in sub-channels.- Specified by:
getFirstPageByChannelIdRecursively
in interfaceIPageManager
- Parameters:
sessionConfig
- the user session information.channelId
- the channel identifier.transaction
- the transaction for persistence access.- Returns:
- the page.
- Throws:
PortalObjectNotFoundException
- if no such page was found.PortalException
-
getIdsByParentChannelIdRecursively
public List<String> getIdsByParentChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getIdsByParentChannelIdRecursively
in interfaceIPageManager
- Returns:
- a array of strings.
- Throws:
ManagerException
PortalException
-
addCssLink
public void addCssLink(SessionConfig sessionConfig, String pageId, String cssId, int position, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Add the hyperlink to the page's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Specified by:
addCssLink
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
deleteCssLink
public void deleteCssLink(SessionConfig sessionConfig, String pageId, String cssId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Delete the hyperlink to the page's CSS file. To access this method, the user needs the PERMISSION_TYPE_PAGES_LAYOUT permission.- Specified by:
deleteCssLink
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
getCssIds
public List<String> getCssIds(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Get a list of Css Ids of the page.- Specified by:
getCssIds
in interfaceIPageManager
- Returns:
- an arrays of Strings.
- Throws:
ManagerException
PortalException
-
getCssIdsRecursively
public List<String> getCssIdsRecursively(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Get a list of Css Ids of the page including inherited Css.- Specified by:
getCssIdsRecursively
in interfaceIPageManager
- Returns:
- an arrays of Strings.
- Throws:
ManagerException
PortalException
-
getMetaTagIdsRecursively
public List<String> getMetaTagIdsRecursively(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Get a list of Meta-Tags Ids of the page including inherited Meta-Tags.- Specified by:
getMetaTagIdsRecursively
in interfaceIPageManager
- Returns:
- Throws:
ManagerException
PortalException
-
getCenterPage
public boolean getCenterPage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getCenterPage
in interfaceIPageManager
- Returns:
- true if the pages is centered and false otherwise.
- Throws:
ManagerException
PortalException
-
getLayoutType
public int getLayoutType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns the layout type used for rendering the page to the end user.The return would be one of
PageConfig.PAGE_LAYOUT_TYPE_INHERIT
,PageConfig.PAGE_LAYOUT_TYPE_WITH_TABLES
orPageConfig.PAGE_LAYOUT_TYPE_TABLELESS
- Specified by:
getLayoutType
in interfaceIPageManager
- Returns:
- the layout format.
- Throws:
ManagerException
PortalException
-
getCachePage
public int getCachePage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getCachePage
in interfaceIPageManager
- Returns:
- an integer.
- Throws:
ManagerException
PortalException
-
getProtocolScheme
public String getProtocolScheme(SessionConfig sessionConfig, int protocolType, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Return the protocol Scheme of the page given a protocol type.This method returns a string representation of the protocol type.
- Specified by:
getProtocolScheme
in interfaceIPageManager
- Returns:
- If the protocol type is
PageConfig.PAGE_PROTOCOL_HTTP
,PageConfig.PAGE_PROTOCOL_HTTP_NAME
is returned.
If the protocol type isPageConfig.PAGE_PROTOCOL_HTTPS
,PageConfig.PAGE_PROTOCOL_HTTPS_NAME
is returned.
In all other cases null is returned. - Throws:
ManagerException
PortalException
-
getProtocolType
public int getProtocolType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Returns the protocolType of the given page.This method checks recursively up the page´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
- Specified by:
getProtocolType
in interfaceIPageManager
- Returns:
- Throws:
ManagerException
PortalException
-
copy
public void copy(SessionConfig sessionConfig, String sourcePageId, String destinationPageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Copy the layout and properties from the original page to the destination page. Also replace all the destination page's interface instances with new instances of interfaces that exists in the source page.- Specified by:
copy
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
serialize
public void serialize(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serialize
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
deserialize
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserialize
in interfaceIPageManager
- Returns:
- a String.
- Throws:
ManagerException
PortalException
-
deserialize
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, boolean firstDeserialization, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserialize
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
updateDeserializedPageLayout
public void updateDeserializedPageLayout(SessionConfig sessionConfig, DeserializationConfig deserealizationConfig, String pageId, ITransaction transaction) throws PortalException
- Specified by:
updateDeserializedPageLayout
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
getIdsByServiceInstanceId
public Collection<String> getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
- Specified by:
getIdsByServiceInstanceId
in interfaceIPageManager
- Parameters:
sessionConfig
- identifier for the session.serviceInstanceId
- the id of the service instance.transaction
- the transaction for persistence access.- Returns:
- the ids of the pages that contain an interface of the given service instance id.
- Throws:
PortalException
-
serializeCss
public void serializeCss(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
serializeCss
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
deserializeCss
public void deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
deserializeCss
in interfaceIPageManager
- Throws:
ManagerException
PortalException
-
getIdsByParentTemplateId
public Collection<String> getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction) throws ManagerException, PortalException
- Specified by:
getIdsByParentTemplateId
in interfaceIPageManager
- Returns:
- Throws:
ManagerException
PortalException
-
clearCache
public void clearCache(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IPageManager
Clear the page cache.This method clears the following caches
- Page Config
- Page Cache HTML
- Page ACL
- ServiceInterfaceInstanceConfig caches calling the service interface instance manager
- ServiceInterfaceInstanceHtmlCache
- Specified by:
clearCache
in interfaceIPageManager
- Throws:
ManagerException
PortalException
- See Also:
IPageManager.clearCache(SessionConfig, Collection, ITransaction)
-
clearCache
public void clearCache(SessionConfig sessionConfig, Collection<String> pageIds, ITransaction transaction) throws PortalException
Description copied from interface:IPageManager
Clears the cache for a group of pages. The following caches are cleared:PageConfig
instances cache- Page cache HTML (may be done asynchronously)
- Caches cleaned by calling
IServiceInterfaceInstanceManager.clearCache(SessionConfig, String, ITransaction)
for each interface instance in the pages.
IPageManager.clearCache(SessionConfig, String, ITransaction)
.- Specified by:
clearCache
in interfaceIPageManager
- Parameters:
sessionConfig
- the user session information.pageIds
- the page identifiers.transaction
- the transaction for persistence access.- Throws:
PortalException
- See Also:
IPageManager.clearCache(SessionConfig, String, ITransaction)
-
deleteConfig
public void deleteConfig(DeserializationContext deserializationContext, String configId) throws PortalException
- Specified by:
deleteConfig
in interfaceIConfigDeleter
- Throws:
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 interfaceIConfigKeyChecker
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, PageConfig pageConfig, ITransaction transaction) throws PortalException
Deprecated.Description copied from interface:IPageManager
Returns the runtime data provider class name for the given page. This method recursively traverses up a channel tree starting from the given page until the first page/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 interfaceIPageManager
- Parameters:
sessionConfig
- current user sessionpageConfig
- page configurationtransaction
- current transaction- Returns:
- class name of the data provider class
- Throws:
PortalException
-
getPageWebResourceDataProviderClassName
public String getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws PortalException
Description copied from interface:IPageManager
Returns theIPageWebResourceDataProvider
class name for the given page.This method recursively traverses up a channel tree starting from the given page until the first channel that does not inherit the web resource 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 interfaceIPageManager
- Parameters:
sessionConfig
- user session information.pageConfig
- the page.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 aWebResource
instance based on a dynamic path.- Specified by:
createWebResourceByDynamicPath
in interfaceIWebResourceFactory
- Parameters:
dynamicPath
- the dynamic path.- Returns:
- the web resource.
- Throws:
PortalException
- Since:
- 5.0.0
-
setPageCacheFilePath
public void setPageCacheFilePath(PageCacheConfig pageCache)
Description copied from interface:IWebResourceFactory
Sets the file path for aPageCacheConfig
.- Specified by:
setPageCacheFilePath
in interfaceIWebResourceFactory
- Parameters:
pageCache
- the page cache.- 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 interfaceIWebResourceFactory
- 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 interfaceIWebResourceFactory
- 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 interfaceIWebResourceFactory
- Parameters:
webResource
- the web resource.friendlyPath
- the resolved friendly path.- Returns:
- the adjusted friendly path value.
-
adjustFriendlyPathForClash
public String adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, String suffix)
Description copied from interface:IWebResourceFactory
Adjusts a friendly path due to clash.- Specified by:
adjustFriendlyPathForClash
in interfaceIWebResourceFactory
- Parameters:
originalFriendlyPath
- the original friendly path resolved.clashedFriendlyPath
- the last clashed friendly path value.- Returns:
- the adjusted friendly path value.
-
requiresFriendlyPathUpdate
public boolean requiresFriendlyPathUpdate(WebResource webResource)
Description copied from interface:IWebResourceFactory
Returns whether the friendly path for the given web resource requires updating.- Specified by:
requiresFriendlyPathUpdate
in interfaceIWebResourceFactory
- Parameters:
webResource
- the web resource.- Returns:
true
if update is required,false
otherwise.
-
clearCssAndMetatagCache
public void clearCssAndMetatagCache(String pageId, ITransaction transaction) throws PortalException
Clears the CSS and Metatag caches of the page with the given identifier.- Parameters:
pageId
- the page identifier.transaction
- the transaction the cache must be cleared with.- Throws:
PortalException
- Since:
- 10.2.0
-
-