|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Page
Defines the interface of a CQ WCM Page.
| Method Summary | |
|---|---|
boolean |
canUnlock()
Return a flag indicating whether the current user can unlock a page. |
Page |
getAbsoluteParent(int level)
Returns the absolute parent page. |
org.apache.sling.api.resource.Resource |
getContentResource()
Returns the resource of the page's content or null if
the page has no content. |
org.apache.sling.api.resource.Resource |
getContentResource(String relPath)
Returns the addressed resource of the page's content or null
if the respective resource does not exist. |
int |
getDepth()
Returns the hierarchical depth of the page. |
Locale |
getLanguage(boolean ignoreContent)
Returns the content language of the page. |
Calendar |
getLastModified()
Returns the time when the page was last modified or null if
this information is not available or if the page has no content. |
String |
getLastModifiedBy()
Return the user id that last modified the page or null if this
information is not available or if the page has no content. |
String |
getLockOwner()
Return the lock owner of a page. |
String |
getName()
Returns the name of the page. |
String |
getNavigationTitle()
Returns the navigation title of the page or null if none
defined. |
Calendar |
getOffTime()
Returns the offTime of the page. |
Calendar |
getOnTime()
Returns the onTime of the page. |
PageManager |
getPageManager()
Convenience method that returns the manager of this page. |
String |
getPageTitle()
Returns the page title of the page or null if none defined. |
Page |
getParent()
Returns the parent page if it's resource adapts to page. |
Page |
getParent(int level)
Returns the relative parent page. |
String |
getPath()
Returns the path of the page. |
org.apache.sling.api.resource.ValueMap |
getProperties()
Returns a value map of the page content. |
org.apache.sling.api.resource.ValueMap |
getProperties(String relPath)
Returns a value map of the address content of the page. |
com.day.cq.tagging.Tag[] |
getTags()
Returns the tags set on this page. |
Template |
getTemplate()
Returns the template that was used to create this page or null
if none defined. |
String |
getTitle()
Returns the title of the page or null if none defined. |
String |
getVanityUrl()
Returns the vanity url. |
boolean |
hasChild(String name)
Checks if the page has a child page named name |
boolean |
hasContent()
Checks if the page has content attached. |
boolean |
isHideInNav()
Returns the "hideInNav" flag or false if non defined. |
boolean |
isLocked()
Checks if this page is locked. |
boolean |
isValid()
Checks if the page is valid. |
Iterator<Page> |
listChildren()
Returns an iterator over all child resources that adapt to a page. |
Iterator<Page> |
listChildren(Filter<Page> filter)
Returns an iterator over all child resources that adapt to a page and that are included in the given filter. |
void |
lock()
Lock a page. |
long |
timeUntilValid()
Returns the number of milliseconds when this page gets valid. |
void |
unlock()
Unlock a page. |
| Methods inherited from interface org.apache.sling.api.adapter.Adaptable |
|---|
adaptTo |
| Methods inherited from interface com.day.cq.commons.LabeledResource |
|---|
getDescription |
| Method Detail |
|---|
String getPath()
getPath in interface LabeledResourcePageManager getPageManager()
org.apache.sling.api.resource.Resource getContentResource()
null if
the page has no content.
nullhasContent()org.apache.sling.api.resource.Resource getContentResource(String relPath)
null
if the respective resource does not exist. If relPath is
null or an empty string the toplevel content resource is
returned.
relPath - relative path into content
null
IllegalArgumentException - if path is not relative.Iterator<Page> listChildren()
Iterator<Page> listChildren(Filter<Page> filter)
filter - for iteration. may be null
boolean hasChild(String name)
name
name - Name of the child
true if the page has this child;
false otherwise.int getDepth()
getParent() calls would be needed to reach the root node.
Page getParent()
nullPage getParent(int level)
null is returned.
Example (this path == /content/geometrixx/en/products)
level - hierarchy level of the parent page to retrieve
nullPage getAbsoluteParent(int level)
null is returned.
Example (this path == /content/geometrixx/en/products)
level - hierarchy level of the parent page to retrieve
nullorg.apache.sling.api.resource.ValueMap getProperties()
hasContent()org.apache.sling.api.resource.ValueMap getProperties(String relPath)
null is returned. If relPath is
null or an empty string the toplevel content properties are
returned.
relPath - relative path to the content
null
IllegalArgumentException - of the given path is not relative.String getName()
getName in interface LabeledResourceString getTitle()
null if none defined.
The title is a short form of the page title, usually displayed in the
site admin.
getTitle in interface LabeledResourceString getPageTitle()
null if none defined.
String getNavigationTitle()
null if none
defined. The navigation title is usually used when drawing navigation
links.
boolean isHideInNav()
false if non defined.
The hideInNav flag is usually used to control if a page should be
displayed in a navigation.
boolean hasContent()
true if the page has content;
false otherwise.boolean isValid()
true if the page is valid;
false otherwise.long timeUntilValid()
0 is returned. If the page is out dated,
i.e. the offTime is in the past, a negative number is returned. If this
page has no content Long.MIN_VALUE is returned.
Calendar getOnTime()
onTime of the page. The onTime defines after
which time it is valid. If no onTime is specified null is
returned and the onTime is not respected in the isValid()
calculation.
nullCalendar getOffTime()
offTime of the page. The offTime defines before
which time it is valid. If no offTime is specified null is
returned and the offTime is not respected in the isValid()
calculation.
nullString getLastModifiedBy()
null if this
information is not available or if the page has no content.
nullCalendar getLastModified()
null if
this information is not available or if the page has no content.
nullString getVanityUrl()
nullcom.day.cq.tagging.Tag[] getTags()
void lock()
throws WCMException
WCMException - if an error during this operation occurs.boolean isLocked()
true if this page is locked.String getLockOwner()
null if the page is not lockedboolean canUnlock()
true if the page can be unlocked;
false otherwise
void unlock()
throws WCMException
WCMException - if an error during this operation occurs.Template getTemplate()
null
if none defined.
nullLocale getLanguage(boolean ignoreContent)
jcr:language property containing
the iso codes for language and country. if the property is not defined
on this page all ancestors are search for such an property. If no language
is defined at all, the path is examined if it contains a iso label. If no
language can be found at all, the systems default locale is returned.
If ignoreConent is true, only the names of the
path is used to determine the language.
Note that this has nothing to do with i18n of the cq5 itself.
ignoreContent - if true only the path is used to
determine the language.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||