Interface Revision


  • public interface Revision
    Defines the interface of a CQ page revision.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getComment()
      Return the optional comment for this revision.
      java.util.Calendar getCreated()
      Return the creation date.
      java.lang.String getDescription()
      Returns the description of this resource.
      java.lang.String getExistingPagePath()
      Returns the path of the existing page if exists.
      java.lang.String getId()
      Return the unique version id.
      java.lang.String getLabel()
      Return the version label.
      java.lang.String getName()
      Returns the name of the page.
      java.lang.String getNavigationTitle()
      Returns the navigation title of the page or null if none defined.
      java.lang.String getPageTitle()
      Returns the page title of the page or null if none defined.
      java.lang.String getParentPath()
      Return the parent path of the page.
      ValueMap getProperties()
      Returns a property map of the page content.
      ValueMap getProperties​(java.lang.String relPath)
      Returns a property map of the address content of the page.
      java.lang.String getTitle()
      Returns the title of the page or null if none defined.
      java.lang.String getVanityUrl()
      Returns the vanity url.
      Version getVersion()
      Returns the underlying version.
      boolean hasContent()
      Checks if the page has content attached.
      boolean isBaseVersion()
      Indicates if this revision is the current base version of the respective page.
      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.
    • Method Detail

      • 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:
        hasContent()
      • getProperties

        ValueMap getProperties​(java.lang.String relPath)
        Returns a property map of the address content of the page. Respective content does not exit, null is returned.
        Parameters:
        relPath - relative path to the content
        Returns:
        a value map or null
        Throws:
        java.lang.IllegalArgumentException - of the given path is not relative.
      • getLabel

        java.lang.String getLabel()
        Return the version label.
        Returns:
        version label
      • getId

        java.lang.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:
        true if the associated page is deleted; false otherwise
      • isBaseVersion

        boolean isBaseVersion()
        Indicates if this revision is the current base version of the respective page.
        Returns:
        true if base version.
        Since:
        5.5
      • getName

        java.lang.String getName()
        Returns the name of the page. this is the last path segment of the page path.
        Returns:
        page name
      • getParentPath

        java.lang.String getParentPath()
        Return the parent path of the page.
        Returns:
        parent path
      • getTitle

        java.lang.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.
        Returns:
        title of the page
      • getDescription

        java.lang.String getDescription()
        Returns the description of this resource.
        Returns:
        the description of this resource or null if not defined.
      • getPageTitle

        java.lang.String getPageTitle()
        Returns the page title of the page or null if none defined.
        Returns:
        page title
      • getNavigationTitle

        java.lang.String getNavigationTitle()
        Returns the navigation title of the page or null if none defined. The navigation title is usually used when drawing navigation links.
        Returns:
        navigation title
      • isHideInNav

        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.
        Returns:
        hide in navigation flag
      • hasContent

        boolean hasContent()
        Checks if the page has content attached.
        Returns:
        true if the page has content; false otherwise.
      • getVanityUrl

        java.lang.String getVanityUrl()
        Returns the vanity url.
        Returns:
        The vanity url for this page or null
      • getCreated

        java.util.Calendar getCreated()
        Return the creation date.
        Returns:
        creation date
      • getComment

        java.lang.String getComment()
        Return the optional comment for this revision.
        Returns:
        comment or null
      • getExistingPagePath

        java.lang.String getExistingPagePath()
        Returns the path of the existing page if exists.
        Returns:
        the path of the existing page.