Package com.day.cq.wcm.api
Interface Revision
public interface Revision
Defines the interface of a CQ page revision.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the optional comment for this revision.Return the creation date.Returns the description of this resource.Returns the path of the existing page if exists.getId()Return the unique version id.getLabel()Return the version label.getName()Returns the name of the page.Returns the navigation title of the page ornullif none defined.Returns the page title of the page ornullif none defined.Return the parent path of the page.Returns a property map of the page content.getProperties(String relPath) Returns a property map of the address content of the page.getTitle()Returns the title of the page ornullif none defined.Returns the vanity url.Returns the underlying version.booleanChecks if the page has content attached.booleanIndicates if this revision is the current base version of the respective page.booleanReturn a flag indicating whether this revision belongs to a deleted page.booleanReturns the "hideInNav" flag orfalseif non defined.
-
Method Details
-
getVersion
Version getVersion()Returns the underlying version.- Returns:
- the JCR version
- Since:
- 5.5
-
getProperties
ValueMap getProperties()Returns a property map of the page content. If the page has no content an empty property map is returned.- Returns:
- a value map
- See Also:
-
getProperties
Returns a property map of the address content of the page. Respective content does not exit,nullis returned.- Parameters:
relPath- relative path to the content- Returns:
- a value map or
null - Throws:
IllegalArgumentException- of the given path is not relative.
-
getLabel
String getLabel()Return the version label.- Returns:
- version label
-
getId
String getId()Return the unique version id.- Returns:
- version id
-
isDeleted
boolean isDeleted()Return a flag indicating whether this revision belongs to a deleted page.- Returns:
trueif the associated page is deleted;falseotherwise
-
isBaseVersion
boolean isBaseVersion()Indicates if this revision is the current base version of the respective page.- Returns:
trueif base version.- Since:
- 5.5
-
getName
String getName()Returns the name of the page. this is the last path segment of the page path.- Returns:
- page name
-
getParentPath
String getParentPath()Return the parent path of the page.- Returns:
- parent path
-
getTitle
String getTitle()Returns the title of the page ornullif none defined. The title is a short form of the page title, usually displayed in the site admin.- Returns:
- title of the page
-
getDescription
String getDescription()Returns the description of this resource.- Returns:
- the description of this resource or
nullif not defined.
-
getPageTitle
String getPageTitle()Returns the page title of the page ornullif none defined.- Returns:
- page title
-
hasContent
boolean hasContent()Checks if the page has content attached.- Returns:
trueif the page has content;falseotherwise.
-
getVanityUrl
String getVanityUrl()Returns the vanity url.- Returns:
- The vanity url for this page or
null
-
getCreated
Calendar getCreated()Return the creation date.- Returns:
- creation date
-
getComment
String getComment()Return the optional comment for this revision.- Returns:
- comment or
null
-
getExistingPagePath
String getExistingPagePath()Returns the path of the existing page if exists.- Returns:
- the path of the existing page.
-