com.day.cq.wcm.core.impl
Class RevisionImpl

java.lang.Object
  extended by com.day.cq.wcm.core.impl.RevisionImpl
All Implemented Interfaces:
Revision

public class RevisionImpl
extends Object
implements Revision

Implementation of a CQ page revision.


Constructor Summary
RevisionImpl(Version version)
          Create a new version of this class.
RevisionImpl(Version version, boolean deleted)
          Create a new version of this class.
 
Method Summary
 Calendar getCreated()
          Return the creation date.
 String getDescription()
          Returns the description of this resource.
 String getId()
          Return the unique version id.
 String getLabel()
          Return the version label.
 String getName()
          Returns the name of the page.
 String getNavigationTitle()
          Returns the navigation title of the page or null if none defined.
 String getPageTitle()
          Returns the page title of the page or null if none defined.
 String getParentPath()
          Return the parent path of the page.
 org.apache.sling.api.resource.ValueMap getProperties()
          Returns a property map of the page content.
 org.apache.sling.api.resource.ValueMap getProperties(String relPath)
          Returns a property map of the address content of the page.
 String getTitle()
          Returns the title of the page or null if none defined.
 String getVanityUrl()
          Returns the vanity url.
 boolean hasContent()
          Checks if the page has content attached.
 boolean isDeleted()
          Return a flag indicating whether this revision belongs to a deleted page.
 boolean isHideInNav()
          Returns the "hideInNav" flag or false if non defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RevisionImpl

public RevisionImpl(Version version,
                    boolean deleted)
             throws RepositoryException
Create a new version of this class.

Parameters:
version - associated version information
deleted - flag indicating whether the associated page is deleted
Throws:
RepositoryException - if an error occurs

RevisionImpl

public RevisionImpl(Version version)
             throws RepositoryException
Create a new version of this class.

Parameters:
version - associated version information
Throws:
RepositoryException - if an error occurs
Method Detail

getProperties

public org.apache.sling.api.resource.ValueMap getProperties()
Returns a property map of the page content. If the page has no content an empty property map is returned.

Specified by:
getProperties in interface Revision
Returns:
a value map
See Also:
Revision.hasContent()

getProperties

public org.apache.sling.api.resource.ValueMap getProperties(String relPath)
Returns a property map of the address content of the page. Respective content does not exit, null is returned.

Specified by:
getProperties in interface Revision
Parameters:
relPath - relative path to the content
Returns:
a value map or null

getId

public String getId()
Return the unique version id.

Specified by:
getId in interface Revision
Returns:
version id

getLabel

public String getLabel()
Return the version label.

Specified by:
getLabel in interface Revision
Returns:
version label

isDeleted

public boolean isDeleted()
Return a flag indicating whether this revision belongs to a deleted page.

Specified by:
isDeleted in interface Revision
Returns:
true if the associated page is deleted; false otherwise

getName

public String getName()
Returns the name of the page. this is the last path segment of the page path.

Specified by:
getName in interface Revision
Returns:
page name

getParentPath

public String getParentPath()
Return the parent path of the page.

Specified by:
getParentPath in interface Revision
Returns:
parent path

getTitle

public String getTitle()
Returns the title of the page or null if none defined. The title is a short form of the page title, usually displayed in the site admin.

Specified by:
getTitle in interface Revision
Returns:
title of the page

getDescription

public String getDescription()
Returns the description of this resource.

Specified by:
getDescription in interface Revision
Returns:
the description of this resource or null if not defined.

getPageTitle

public String getPageTitle()
Returns the page title of the page or null if none defined.

Specified by:
getPageTitle in interface Revision
Returns:
page title

getNavigationTitle

public String getNavigationTitle()
Returns the navigation title of the page or null if none defined. The navigation title is usually used when drawing navigation links.

Specified by:
getNavigationTitle in interface Revision
Returns:
navigation title

isHideInNav

public boolean isHideInNav()
Returns the "hideInNav" flag or false if non defined. The hideInNav flag is usually used to control if a page should be displayed in a navigation.

Specified by:
isHideInNav in interface Revision
Returns:
hide in navigation flag

hasContent

public boolean hasContent()
Checks if the page has content attached.

Specified by:
hasContent in interface Revision
Returns:
true if the page has content; false otherwise.

getVanityUrl

public String getVanityUrl()
Returns the vanity url.

Specified by:
getVanityUrl in interface Revision
Returns:
The vanity url for this page or null

getCreated

public Calendar getCreated()
Return the creation date.

Specified by:
getCreated in interface Revision
Returns:
creation date


Copyright © 2008 Day Management AG. All Rights Reserved.