Class Page

    • Field Detail


        public static final int MAX_TOC_LEVELS
        This matches the table of contents implementation in /semanticcms-section-servlet/ and is a result of HTML only having H1 through H6. H1 is reserved for the page title and headings become H2 through H6.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Page

        public Page()
    • Method Detail

      • hashCode

        public int hashCode()
        hashCode in class Object
      • getPageRef

        public PageRef getPageRef()
        The PageRef that refers to this page.
      • setPageRef

        public void setPageRef​(PageRef pageRef)
      • getSrc

        public PageRef getSrc()
        The PageRef of the editable source for this page, if any. Note: Although atypical, the page source may be in a different book than the page itself.
      • setSrc

        public void setSrc​(PageRef src)
      • getCopyright

        public Copyright getCopyright()
      • setCopyright

        public void setCopyright​(Copyright copyright)
      • getAuthors

        public Set<Author> getAuthors()
      • addAuthor

        public void addAuthor​(Author author)
      • setDatePublished

        public void setDatePublished​(ReadableDateTime datePublished)
      • setDateModified

        public void setDateModified​(ReadableDateTime dateModified)
      • getDateReviewed

        public DateTime getDateReviewed()
        This has no equivalent in, however we feel it is important to actively review content to ensure its accuracy, even when it has not been modified.
      • setDateReviewed

        public void setDateReviewed​(ReadableDateTime dateReviewed)
      • getTitle

        public String getTitle()
      • setTitle

        public void setTitle​(String title)
      • getShortTitle

        public String getShortTitle()
        A short title is used when the context of a page is well established, such as when showing a path to the current location in the site. The short title defaults to getTitle.
        the short page title
        See Also:
      • setShortTitle

        public void setShortTitle​(String shortTitle)
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String description)
      • getKeywords

        public String getKeywords()
      • setKeywords

        public void setKeywords​(String keywords)
      • getAllowRobots

        public Boolean getAllowRobots()
        Gets the allowRobots setting.
        • null (The default) - Inherit setting from parent(s) within the book or book settings if have no parents within the book
        • true - Robots allowed
        • false - Robots not allowed
      • setAllowRobots

        public void setAllowRobots​(Boolean allowRobots)
      • getRegistry

        public Registry getRegistry()
        Gets the page-scope web resource registry for this page or null if the page has not configured any resources.
      • setRegistry

        public void setRegistry​(Registry registry)
        Sets the page-scope web resource registry for this page or null if the page has not configured any resources.
      • getToc

        public Boolean getToc()
        Gets the table of contents (toc) setting:
        • null (The default) - Show table of contents depending on number of entries in the table
        • true - Always show table of contents
        • false - Never show table of contents
        TODO: Move this to Section.
      • setToc

        public void setToc​(Boolean toc)
      • getTocLevels

        public int getTocLevels()
        TODO: Move this to Section.
      • setTocLevels

        public void setTocLevels​(int tocLevels)
      • addParentRef

        public void addParentRef​(ParentRef parentRef)
      • getAllowParentMismatch

        public boolean getAllowParentMismatch()
      • setAllowParentMismatch

        public void setAllowParentMismatch​(boolean allowParentMismatch)
      • addChildRef

        public void addChildRef​(ChildRef childRef)
      • getAllowChildMismatch

        public boolean getAllowChildMismatch()
      • setAllowChildMismatch

        public void setAllowChildMismatch​(boolean allowChildMismatch)
      • getElements

        public List<Element> getElements()
        Gets all elements in the page (including all child elements), in the order they were declared in the page.
      • filterElements

        public <E extends ElementList<E> filterElements​(Class<E> clazz)
        Gets all elements in the page (including all child elements) that are of the given type, in the order they were declared in the page.
      • getElementsById

        public Map<String,​Element> getElementsById()
        Gets the elements indexed by id, in no particular order. Note, while the page is being created, elements with automatic IDs will not be in this map. However, once frozen, every element will have an ID.
        See Also:
      • getGeneratedIds

        public Set<String> getGeneratedIds()
        Gets which element IDs were generated.
      • addElement

        public void addElement​(Element element)
        Adds an element to this page.