Class AbstractPage

    • Constructor Detail

      • AbstractPage

        public AbstractPage()
    • Method Detail

      • isValidPageTitle

        public static boolean isValidPageTitle​(String title)
      • isValidTitleLength

        public static boolean isValidTitleLength​(String title)
      • convertToHistoricalVersion

        public void convertToHistoricalVersion()
        Description copied from interface: Versioned
        Remove all data from the object that does not need to be saved by historical versions. For versioned objects that are persisted, this includes removing associations with other persisted objects that may otherwise cause us to break the expected arity of the database relations.

        When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.

        Specified by:
        convertToHistoricalVersion in interface Versioned
        convertToHistoricalVersion in class SpaceContentEntityObject
      • getOriginalVersionPage

        public AbstractPage getOriginalVersionPage()
        if this page is a historical version, then this method returns the current/latest version of this page if this page is the latest version, then this returns null this method name should really be refactored to getCurrentVersionOfPage()
      • setOriginalVersionPage

        public void setOriginalVersionPage​(AbstractPage originalVersionPage)
      • getPreviousVersion

        public int getPreviousVersion()
        Convenience method to get the immediately prior version since we can't perform arithmetic in velocity (assume that versions are sequential) Method is used in email templates where session is not available. Hence we cannot load previousVersions to return a page object
      • remove

        public void remove​(PageManager pageManager)
        Remove this page from the world. This method should sever any inverse relationships this page may have with other objects.
      • getEditUrlPath

        public String getEditUrlPath()
        String a URL to edit the page in the Confluence editor.
      • getPageLevelComments

        public List<Comment> getPageLevelComments()
        List of page-level (i.e. not inline) comments.
      • getTopLevelComments

        public List<Comment> getTopLevelComments()
      • getAttachmentUrlPath

        public String getAttachmentUrlPath​(Attachment attachment)
        Description copied from class: ContentEntityObject
        Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments). Generally you will want to call Attachment.getUrlPath() instead of this method: if we ever implement view pages for individual attachments, that's the method that will be changed to point to them.

        The default implementation just returns the view page for this content.

        getAttachmentUrlPath in class ContentEntityObject
        attachment - one of this content's attachments
        the path relative to the base url to view the attachment in the context of this content.