nl.gx.webmanager.cms.core
Interface Page

All Superinterfaces:
Wrapper

public interface Page
extends Wrapper

Representation of Page object.


Field Summary
static java.lang.String DATABASEPAGE_TYPE
          page type for database pages.
static java.lang.String PAGE_TYPE
          Page type for normal pages.
static java.lang.String PAGEMODEL_TYPE
          Page type for page models.
static java.lang.String PAGESECTION_TYPE
          Page type for page sections.
 
Method Summary
 BlockLabel getBlockLabel()
          Deprecated. use getBlockLabels() instead
 BlockLabel[] getBlockLabels()
          Return block labels associated with the page (if it is a block) or null.
 PageVersion getCurrent()
          Returns the published version.
 PageVersion getCurrent(Language language)
          Returns the published page version for the given language.
 Language getDefaultEditingLanguage()
          Returns the default editing language of this page.
 PageVersion getEditVersion(javax.servlet.http.HttpServletRequest request)
          Return version of the page you're currently editing.
 RelatedInternalLink[] getInternalLinksToPage()
          Returns all internal links that refer to this page.
 Page getLevel1Page()
          Return a level 1 page (subpage from the homepage).
 Page getLevelPage(int level)
          Returns the page for specific level (level 0 is the homepage).
 Link getLink()
          Returns the Link to this page.
 MediaItemPageVersion getMediaItemPageVersion()
           
 java.lang.String getPageType()
          Returns the page type of this page.
 Page getParent()
          Return the parent page.
 Page[] getParents()
          Return parent, parent's parent, etc.
 PageVersion getPlanned()
          Return the latest planned version.
 PageVersion getPlanned(Language language)
          Returns the latest planned page version for the given language.
 Page[] getSubPages()
          Return sub pages.
 PageVersion[] getVersions()
          Return all versions of this Page.
 PageVersion[] getVersions(Language language)
          Returns all page versions for the given language.
 Website getWebsite()
          Returns the website this page is on.
 WorkflowModel getWorkflowModel()
          Return the Workflow model assigned to this page or that is inherited from a parent page.
 boolean hasInheritedWorkflowModel()
          Returns if the Workflow model of this page was inherited from a super page or assigned directly to the page itself.
 boolean isBlock()
          Return true if the page is a block.
 
Methods inherited from interface nl.gx.webmanager.wrapper.Wrapper
getId, getUUID, setId, setUUID
 

Field Detail

PAGE_TYPE

static final java.lang.String PAGE_TYPE
Page type for normal pages.

See Also:
Constant Field Values

PAGESECTION_TYPE

static final java.lang.String PAGESECTION_TYPE
Page type for page sections.

See Also:
Constant Field Values

PAGEMODEL_TYPE

static final java.lang.String PAGEMODEL_TYPE
Page type for page models.

See Also:
Constant Field Values

DATABASEPAGE_TYPE

static final java.lang.String DATABASEPAGE_TYPE
page type for database pages.

See Also:
Constant Field Values
Method Detail

getVersions

PageVersion[] getVersions()
Return all versions of this Page. A page always has a minimum of one version.

Returns:
all versions of this Page.

getVersions

PageVersion[] getVersions(Language language)
Returns all page versions for the given language. If no language is given will behave the same as getVersions(). If there are no page versions available for that language then returns null;

Parameters:
language - Return only page versions for this language.
Returns:
All versions available for the given language.

getCurrent

PageVersion getCurrent()
Returns the published version. Returns null if there is no published version available.

Note given the same page calling this method or getPlanned() always returns a page version.

Note that due to performance reasons the current page version is cached request scope. The result is that changing the current page version yields the previous current page version when calling this method after the change. Prerequisite is that this method is called before the change (cache is lazily filled) and that this all happens during the same HTTP request.
Current page version roll-overs might occur when performing a workflow change or change the publication and/or expiration date.

Returns:
current version.

getCurrent

PageVersion getCurrent(Language language)
Returns the published page version for the given language. If no language is given behaves the same as getCurrent(). If there is no published version available for this language then returns null.

Note that given a language it is possible a page has no page version for that language, so that both this method and getPlanned() could return null.

Like getCurrent() this method caches its result request scope.

Parameters:
language - The language for which the current page version should be retrieved.
Returns:
The current page version or null if there is no current page version for this page for the given language.

getPlanned

PageVersion getPlanned()
Return the latest planned version. Returns null if there is no planned version available.

Note given the same page calling this method or getCurrent() always returns a page version.

Returns:
planned version.

getPlanned

PageVersion getPlanned(Language language)
Returns the latest planned page version for the given language. If no language is given behaves the same as getPlanned(). If there is no planned version available then returns null.

Note that given a language it is possible a page has no page version for that language, so that both this method and getCurrent() will return null.

Parameters:
language - The language for which the planned page version should be retrieved.
Returns:
The planned page version or null if there is no planned page version for this page for the given language.

getParent

Page getParent()
Return the parent page. Return null if current page is the homepage or cut loose.

Returns:
parent page.

getParents

Page[] getParents()
Return parent, parent's parent, etc. Useful for breadcrumps path.

Returns:
parent, parent's parent, etc.

getSubPages

Page[] getSubPages()
Return sub pages. Order of these pages is arbitrary; it does not reflect the order as configured in WebManager. Note that sub pages are returned which are marked as invisible for navigation in WebManager. In order to return pages which do reflect the correct order and which are not marked invisible use getSubPages of class PageVersion instead.

Returns:
sub pages.
See Also:
PageVersion.getSubPages(), PageVersion.getSubPagesWithCurrent()

getWebsite

Website getWebsite()
Returns the website this page is on.

Returns:
website this page is on.

getLink

Link getLink()
Returns the Link to this page.

Returns:
Link to this page.

getLevelPage

Page getLevelPage(int level)
Returns the page for specific level (level 0 is the homepage).

Parameters:
level - the specific level
Returns:
page for specific level.

getLevel1Page

Page getLevel1Page()
Return a level 1 page (subpage from the homepage). Which page is returned depends on the current page (which is the result of getPage() on the presentationcontext). As pages are structured tree-like the page node returned is the one in the parent node path (starting with the current page node) including itself and the one which exists on level 1. Return value is null if the current page is the homepage, or if the page or its parents is cut loose.

Returns:
level 1 page of the current page's parent path.

getBlockLabels

BlockLabel[] getBlockLabels()
Return block labels associated with the page (if it is a block) or null.

Returns:
block labels associated with the page (if it is a block) or null.

getBlockLabel

BlockLabel getBlockLabel()
Deprecated. use getBlockLabels() instead

Return the first block label associated with the page (if it is a block) or null.

Returns:
the first block label associated with the page (if it is a block) or null.

isBlock

boolean isBlock()
Return true if the page is a block.

Returns:
true if the page is a block.

getPageType

java.lang.String getPageType()
Returns the page type of this page.

Returns:
page type of this page, one of "page", "block" or "pagemodel"

getInternalLinksToPage

RelatedInternalLink[] getInternalLinksToPage()
Returns all internal links that refer to this page.

Returns:
Array of all internal links that refer to this page

getDefaultEditingLanguage

Language getDefaultEditingLanguage()
Returns the default editing language of this page. This is the language that will be the default language in which content is being edited if the page is opened and the editor didn't specify the editing language.

Returns:
the default editing language of this page

getEditVersion

PageVersion getEditVersion(javax.servlet.http.HttpServletRequest request)
Return version of the page you're currently editing.

Parameters:
request - Current http servlet request
Returns:
version of the page you're currently editing

getWorkflowModel

WorkflowModel getWorkflowModel()
Return the Workflow model assigned to this page or that is inherited from a parent page.

Returns:
Workflow model for this page

hasInheritedWorkflowModel

boolean hasInheritedWorkflowModel()
Returns if the Workflow model of this page was inherited from a super page or assigned directly to the page itself.

Returns:
true if the Workflow model was iherited from a super page, false otherwise

getMediaItemPageVersion

MediaItemPageVersion getMediaItemPageVersion()
Returns:
the associated MediaItemPageVersion, or null if this Page is not stored in the media repository


Copyright © 2007-2011 GX Software BV. All Rights Reserved.