|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.page.PageManager
public class PageManager
Page manager implementation.
Constructor Summary | |
---|---|
PageManager()
|
Method Summary | |
---|---|
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,
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,
Collection<String> pageIds,
ITransaction transaction)
Clears the cache for a group of pages. |
void |
clearCache(SessionConfig sessionConfig,
String pageId,
ITransaction transaction)
Clear the page cache. |
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 a WebResource 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)
|
protected void |
disconnectFromTemplate_Internal(SessionConfig sessionConfig,
PageConfig pageConfig,
ITransaction transaction)
|
void |
disconnectFromTemplate(SessionConfig sessionConfig,
String pageId,
ITransaction transaction)
Disconnect the page from its template if one exists |
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 the IPageWebResourceDataProvider
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,
ITransaction transaction)
Returns the complete path beginnig 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 object |
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 a PageCacheConfig . |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageManager()
Method Detail |
---|
public void addOrUpdate(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
IPageManager
addOrUpdate
in interface IPageManager
ManagerException
PortalException
public String add(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
IPageManager
add
in interface IPageManager
ManagerException
PortalException
public PageConfig get(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
get
in interface IPageManager
ManagerException
PortalException
public void delete(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
delete
in interface IPageManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws PortalException
IPageManager
update
in interface IPageManager
ManagerException
PortalException
protected void disconnectFromTemplate_Internal(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
ManagerException
PortalException
public void disconnectFromTemplate(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
disconnectFromTemplate
in interface IPageManager
ManagerException
PortalException
public void updateLayout(SessionConfig sessionConfig, String pageId, String layout, ITransaction transaction) throws ManagerException, PortalException
IPageManager
updateLayout
in interface IPageManager
ManagerException
PortalException
public void updateSsiProperty(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig, ITransaction transaction) throws PortalException
IPageManager
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.
updateSsiProperty
in interface IPageManager
PortalException
public void deleteOrphanInterfaces(SessionConfig sessionConfig, String pageId, ITransaction daoTransaction) throws ManagerException, PortalException
IPageManager
deleteOrphanInterfaces
in interface IPageManager
ManagerException
PortalException
public String getPath(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getPath
in interface IPageManager
ManagerException
PortalException
public List<String> getParentPathIds(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getParentPathIds
in interface IPageManager
ManagerException
PortalException
public List<String> getIdsByParentChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getIdsByParentChannelId
in interface IPageManager
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
ManagerException
PortalException
public String getFirstIdByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
getFirstIdByChannelId
in interface IPageManager
ManagerException
PortalException
public PageConfig getFirstPageByChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws PortalException
IPageManager
getFirstPageByChannelIdRecursively
in interface IPageManager
sessionConfig
- the user session information.channelId
- the channel identifier.transaction
- the transaction for persistence access.
PortalObjectNotFoundException
- if no such page was found.
PortalException
public List<String> getIdsByParentChannelIdRecursively(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
getIdsByParentChannelIdRecursively
in interface IPageManager
ManagerException
PortalException
public void addCssLink(SessionConfig sessionConfig, String pageId, String cssId, int position, ITransaction transaction) throws ManagerException, PortalException
IPageManager
addCssLink
in interface IPageManager
ManagerException
PortalException
public void deleteCssLink(SessionConfig sessionConfig, String pageId, String cssId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
deleteCssLink
in interface IPageManager
ManagerException
PortalException
public List<String> getCssIds(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getCssIds
in interface IPageManager
ManagerException
PortalException
public List<String> getCssIdsRecursively(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getCssIdsRecursively
in interface IPageManager
ManagerException
PortalException
public List<String> getMetaTagIdsRecursively(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
IPageManager
getMetaTagIdsRecursively
in interface IPageManager
ManagerException
PortalException
public boolean getCenterPage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
getCenterPage
in interface IPageManager
ManagerException
PortalException
public int getLayoutType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
IPageManager
The return would be one of PageConfig.PAGE_LAYOUT_TYPE_INHERIT
,
PageConfig.PAGE_LAYOUT_TYPE_WITH_TABLES
or PageConfig.PAGE_LAYOUT_TYPE_TABLELESS
getLayoutType
in interface IPageManager
ManagerException
PortalException
public int getCachePage(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
getCachePage
in interface IPageManager
ManagerException
PortalException
public String getProtocolScheme(SessionConfig sessionConfig, int protocolType, ITransaction transaction) throws ManagerException, PortalException
IPageManager
This method returns a string representation of the protocol type.
getProtocolScheme
in interface IPageManager
PageConfig.PAGE_PROTOCOL_HTTP
, PageConfig.PAGE_PROTOCOL_HTTP_NAME
is returned.
PageConfig.PAGE_PROTOCOL_HTTPS
, PageConfig.PAGE_PROTOCOL_HTTPS_NAME
is returned.
ManagerException
PortalException
public int getProtocolType(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws ManagerException, PortalException
IPageManager
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
getProtocolType
in interface IPageManager
ManagerException
PortalException
public void copy(SessionConfig sessionConfig, String sourcePageId, String destinationPageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
copy
in interface IPageManager
ManagerException
PortalException
public void serialize(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
serialize
in interface IPageManager
ManagerException
PortalException
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, ITransaction transaction) throws ManagerException, PortalException
deserialize
in interface IPageManager
ManagerException
PortalException
public String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node pageNode, boolean firstDeserialization, ITransaction transaction) throws ManagerException, PortalException
deserialize
in interface IPageManager
ManagerException
PortalException
public void updateDeserializedPageLayout(SessionConfig sessionConfig, DeserializationConfig deserealizationConfig, String pageId, ITransaction transaction) throws PortalException
updateDeserializedPageLayout
in interface IPageManager
ManagerException
PortalException
public Collection<String> getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
getIdsByServiceInstanceId
in interface IPageManager
sessionConfig
- identifier for the session.serviceInstanceId
- the id of the service instance.transaction
- the transaction for persistence access.
PortalException
public void serializeCss(SessionConfig sessionConfig, String pageId, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
serializeCss
in interface IPageManager
ManagerException
PortalException
public void deserializeCss(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node cssLinksNodes, ITransaction transaction) throws ManagerException, PortalException
deserializeCss
in interface IPageManager
ManagerException
PortalException
public Collection<String> getIdsByParentTemplateId(SessionConfig sessionConfig, String parentTemplateId, ITransaction transaction) throws ManagerException, PortalException
getIdsByParentTemplateId
in interface IPageManager
ManagerException
PortalException
public void clearCache(SessionConfig sessionConfig, String pageId, ITransaction transaction) throws ManagerException, PortalException
IPageManager
This method clears the following caches
clearCache
in interface IPageManager
ManagerException
PortalException
IPageManager.clearCache(SessionConfig, Collection, ITransaction)
public void clearCache(SessionConfig sessionConfig, Collection<String> pageIds, ITransaction transaction) throws PortalException
IPageManager
PageConfig
instances cacheIServiceInterfaceInstanceManager.clearCache(SessionConfig, String, ITransaction)
for each interface instance in the pages.IPageManager.clearCache(SessionConfig, String, ITransaction)
.
clearCache
in interface IPageManager
sessionConfig
- the user session information.pageIds
- the page identifiers.transaction
- the transaction for persistence access.
PortalException
IPageManager.clearCache(SessionConfig, String, ITransaction)
public void deleteConfig(DeserializationContext deserializationContext, String configId) throws PortalException
deleteConfig
in interface IConfigDeleter
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
@Deprecated public String getRuntimeDataProviderClassName(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws PortalException
IPageManager
getRuntimeDataProviderClassName
in interface IPageManager
sessionConfig
- current user sessionpageConfig
- page configurationtransaction
- current transaction
PortalException
public String getPageWebResourceDataProviderClassName(SessionConfig sessionConfig, PageConfig pageConfig, ITransaction transaction) throws PortalException
IPageManager
IPageWebResourceDataProvider
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.
getPageWebResourceDataProviderClassName
in interface IPageManager
sessionConfig
- user session information.pageConfig
- the page.transaction
- the transaction for persistence access.
PortalException
public WebResource createWebResourceByDynamicPath(String dynamicPath) throws PortalException
IWebResourceFactory
WebResource
instance based on a dynamic path.
createWebResourceByDynamicPath
in interface IWebResourceFactory
dynamicPath
- the dynamic path.
PortalException
public void setPageCacheFilePath(PageCacheConfig pageCache)
IWebResourceFactory
PageCacheConfig
.
setPageCacheFilePath
in interface IWebResourceFactory
pageCache
- the page cache.public boolean isCacheEnabled(WebResource webResource) throws PortalException
IWebResourceFactory
isCacheEnabled
in interface IWebResourceFactory
webResource
- the web resource.
true
if the cache is enabled, false
otherwise.
PortalException
public void setWebResourcesMissingData(String resourceId, boolean processChildren) throws PortalException
IWebResourceFactory
setWebResourcesMissingData
in interface IWebResourceFactory
resourceId
- the resource owner of the web resources.processChildren
- indicates if web resources of children resources
should also be processed.
PortalException
public String adjustResolvedFriendlyPath(WebResource webResource, String friendlyPath)
IWebResourceFactory
adjustResolvedFriendlyPath
in interface IWebResourceFactory
webResource
- the web resource.friendlyPath
- the resolved friendly path.
public String adjustFriendlyPathForClash(String originalFriendlyPath, String clashedFriendlyPath, int numRetry)
IWebResourceFactory
adjustFriendlyPathForClash
in interface IWebResourceFactory
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |