public interface ContentPage
Page
object for use in rendering. Page
objects are persistent, single-instance
metadata objects that should not be used to hold per-request content. ContentPage
solves this by providing a parallel interface that can be used for rendering
requested content associated with the current user-request.Modifier and Type | Method and Description |
---|---|
ContentFragment |
addFragmentAtRowColumn(ContentFragment fragment,
int row,
int column)
Add fragment to page at specified row column layout position.
|
ContentFragment |
addFragmentReference(String id)
Add fragment reference to page returning associated content
fragment.
|
ContentFragment |
addPortlet(String type,
String name)
Add portlet to page returning associated content fragment.
|
void |
checkAccess(String actions)
Check security access to page.
|
void |
decrementFolderInDocumentOrder()
Decrement position of folder in parent folder document order.
|
void |
decrementInDocumentOrder()
Decrement position of page in folder document order.
|
String |
getContentType()
Get the content type name that applies to this page.
|
String |
getDefaultDecorator(String fragmentType)
Returns the name of the default decorator that applies in this page
to fragments of the specified type
|
String |
getDefId()
Returns the id of the defined root fragment element.
|
String |
getEffectiveDefaultDecorator(String fragmentType)
Returns the name of the default decorator as set here or
in parent folders that applies in this page to fragments
of the specified type.
|
ContentFragment |
getFragmentByFragmentId(String id)
Returns a ContentFragment represented by the underlying PSML Fragment fragment.
|
ContentFragment |
getFragmentByFragmentId(String id,
boolean nonTemplate)
Returns a ContentFragment represented by the underlying PSML Fragment fragment.
|
ContentFragment |
getFragmentById(String id)
Returns a ContentFragment represented by the fragment id argument.
|
Map<String,FragmentDefinition> |
getFragmentDefinitions()
Access underlying concrete persistent fragment definitions
map or null if page is transient or constructed dynamically.
|
int |
getFragmentNestingLevel(String fragmentId)
Compute fragment nesting level of fragment by id.
|
List<ContentFragment> |
getFragmentsByName(String name)
Returns a list of ContentFragment fragments represented by the name argument.
|
List<ContentFragment> |
getFragmentsByName(String name,
boolean nonTemplate)
Returns a list of ContentFragment fragments represented by the name argument.
|
String |
getId()
Returns the unique Id of this element.
|
GenericMetadata |
getMetadata()
Return page metadata.
|
String |
getName()
Returns the name of this page.
|
ContentFragment |
getNonTemplateRootFragment()
Returns the root layout fragment which is not merged
from a page template.
|
PageLayoutComponent |
getPageLayoutComponent()
Returns the PageLayoutComponent that generated this ContentPage
|
BaseFragmentsElement |
getPageOrTemplate()
Access underlying concrete persistent page, template,
or null
if page is transient or constructed dynamically.
|
PageTemplate |
getPageTemplate()
Access underlying concrete persistent page template or
null if page is transient or constructed dynamically.
|
String |
getPath()
Returns the path of this page.
|
ContentFragment |
getRootFragment()
Provides access to a per-request safe ContentFragment.
|
String |
getShortTitle()
Returns the short title in the default Locale
|
String |
getShortTitle(Locale locale)
Returns the short title for the specified locale.
|
String |
getSkin()
Returns the name of the default skin that applies to this
page.
|
String |
getTitle()
Returns the title in the default Locale
|
String |
getTitle(Locale locale)
Returns the title for the specified locale.
|
String |
getUrl()
Returns URL of page.
|
void |
incrementFolderInDocumentOrder()
Increment position of folder in parent folder document order.
|
void |
incrementInDocumentOrder()
Increment position of page in folder document order.
|
boolean |
isHidden()
Whether or not this Node should be hidden in terms of the view.
|
boolean |
isInheritable()
Get inheritable flag that indicates whether this dynamic
page can be inherited for child content pages.
|
void |
moveFragment(String fragmentId,
String fromFragmentId,
String toFragmentId)
Move fragment from current parent layout fragment to another
layout fragment in the same page.
|
void |
newSiblingDynamicPage(String pageName,
String contentType,
String layoutName,
String pageTitle,
String pageShortTitle)
Create new sibling dynamic page with specified configuration.
|
void |
newSiblingFolder(String folderName,
String folderTitle,
String folderShortTitle,
String defaultPageLayoutName)
Create a new sibling folder with specified configuration and
new default page.
|
void |
newSiblingFragmentDefinition(String definitionName,
String defId,
String portletName,
String definitionTitle,
String definitionShortTitle)
Create new sibling fragment definition with specified
configuration.
|
void |
newSiblingPage(String pageName,
String layoutName,
String pageTitle,
String pageShortTitle)
Create new sibling page with specified configuration and add
new page at end of folder document order list.
|
void |
newSiblingPageTemplate(String templateName,
String layoutName,
String templateTitle,
String templateShortTitle)
Create new sibling page template with specified configuration.
|
void |
overrideDefaultDecorator(String decoratorName,
String fragmentType)
Override page default decorator.
|
void |
remove()
Remove page and remove from folder document order list.
|
void |
removeFolder()
Remove folder and remove from parent folder document order list.
|
void |
removeFragment(String fragmentId)
Remove fragment from page by id.
|
void |
updateContent(String contentType,
Boolean inheritable)
Update dynamic page content type and inheritable flag.
|
void |
updateDefaultDecorator(String decoratorName,
String fragmentType)
Update page default decorator.
|
void |
updateFolderTitles(String title,
String shortTitle)
Update folder titles.
|
void |
updateTitles(String title,
String shortTitle)
Update page titles.
|
void checkAccess(String actions) throws SecurityException
actions
- list to be checked against in CSV string formSecurityException
String getId()
String getTitle()
String getShortTitle()
GenericMetadata getMetadata()
String getName()
String getPath()
String getShortTitle(Locale locale)
locale
- String getTitle(Locale locale)
locale
- String getUrl()
boolean isHidden()
String getSkin()
String getDefaultDecorator(String fragmentType)
fragmentType
- the type of fragment consideredContentFragment getRootFragment()
ContentFragment getFragmentById(String id)
id
- unique id of the ContentFragment we want to retrieve.ContentFragment getFragmentByFragmentId(String id)
id
- unique id of the ContentFragment we want to retrieve.List<ContentFragment> getFragmentsByName(String name)
name
- name of the ContentFragments we want to retrieve.String getEffectiveDefaultDecorator(String fragmentType)
fragmentType
- the type of fragment consideredString getContentType()
boolean isInheritable()
String getDefId()
BaseFragmentsElement getPageOrTemplate()
PageTemplate getPageTemplate()
Map<String,FragmentDefinition> getFragmentDefinitions()
PageLayoutComponent getPageLayoutComponent()
void overrideDefaultDecorator(String decoratorName, String fragmentType)
decoratorName
- decorator namefragmentType
- decorator fragment typeContentFragment getFragmentByFragmentId(String id, boolean nonTemplate)
id
- unique id of the content fragment we want to retrieve.nonTemplate
- return only non-template matching fragmentsList<ContentFragment> getFragmentsByName(String name, boolean nonTemplate)
name
- name of the content fragments we want to retrieve.nonTemplate
- return only non-template matching fragmentsContentFragment getNonTemplateRootFragment()
ContentFragment addFragmentAtRowColumn(ContentFragment fragment, int row, int column)
fragment
- externally constructed fragment to addrow
- fragment row positioncolumn
- fragment column positionContentFragment addFragmentReference(String id)
id
- fragment definition idContentFragment addPortlet(String type, String name)
type
- portlet typename
- portlet namevoid decrementFolderInDocumentOrder()
void decrementInDocumentOrder()
int getFragmentNestingLevel(String fragmentId)
fragmentId
- target fragment idvoid incrementFolderInDocumentOrder()
void incrementInDocumentOrder()
void moveFragment(String fragmentId, String fromFragmentId, String toFragmentId)
fragmentId
- fragment id of fragment to movefromFragmentId
- fragment id of current parent layout fragmenttoFragmentId
- fragment id of new parent layout fragmentvoid newSiblingFolder(String folderName, String folderTitle, String folderShortTitle, String defaultPageLayoutName)
folderName
- unique new folder name, (also used as
default page title)folderTitle
- new folder title or nullfolderShortTitle
- new folder short title or nulldefaultPageLayoutName
- root level layout fragment name
for default pagevoid newSiblingPage(String pageName, String layoutName, String pageTitle, String pageShortTitle)
pageName
- unique new page namelayoutName
- root level layout fragment name or nullpageTitle
- new page title or nullpageShortTitle
- new page short title or nullvoid newSiblingDynamicPage(String pageName, String contentType, String layoutName, String pageTitle, String pageShortTitle)
pageName
- unique new dynamic page namecontentType
- dynamic page content typelayoutName
- root level layout fragment name or nullpageTitle
- new page title or nullpageShortTitle
- new page short title or nullvoid newSiblingPageTemplate(String templateName, String layoutName, String templateTitle, String templateShortTitle)
templateName
- unique new page template namelayoutName
- root level layout fragment name or nulltemplateTitle
- new page title or nulltemplateShortTitle
- new page short title or nullvoid newSiblingFragmentDefinition(String definitionName, String defId, String portletName, String definitionTitle, String definitionShortTitle)
definitionName
- unique new fragment definition namedefId
- unique new fragment definition id or nullportletName
- root level portlet fragment name or nulldefinitionTitle
- new page title or nulldefinitionShortTitle
- new page short title or nullvoid removeFragment(String fragmentId)
fragmentId
- id of fragment to removevoid remove()
void removeFolder()
void updateContent(String contentType, Boolean inheritable)
contentType
- dynamic page content typecontentType
- dynamic page content typevoid updateDefaultDecorator(String decoratorName, String fragmentType)
decoratorName
- decorator namefragmentType
- decorator fragment typevoid updateFolderTitles(String title, String shortTitle)
title
- folder titleshortTitle
- folder short titleCopyright © 1999–2016 The Apache Software Foundation. All rights reserved.