Interface Page

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALIAS
      A special variable name for storing a page alias.
      static java.lang.String AUTHOR
      A special variable name for storing the author.
      static java.lang.String CHANGENOTE
      A special variable name for storing a changenote.
      static java.lang.String DESCRIPTION
      "Summary" is a short summary of the page.
      static java.lang.String REDIRECT
      A special variable name for storing a redirect note
      static java.lang.String VIEWCOUNT
      A special variable name for storing a viewcount.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Page clone()
      Acl getAcl()
      Returns the Acl for this page.
      <T> T getAttribute​(java.lang.String key)
      A WikiPage may have a number of attributes, which might or might not be available.
      java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
      Returns the full attributes Map, in case external code needs to iterate through the attributes.
      java.lang.String getAuthor()
      Returns author name, or null, if no author has been defined.
      java.util.Date getLastModified()
      Returns the date when this page was last modified.
      java.lang.String getName()
      Returns the name of the page.
      long getSize()
      Returns the size of the page.
      int getVersion()
      Returns the version that this WikiPage instance represents.
      java.lang.String getWiki()
      Returns the wiki name for this page
      boolean hasMetadata()
      Returns true if the page has valid metadata; that is, it has been parsed.
      void invalidateMetadata()
      This method will remove all metadata from the page.
      <T> T removeAttribute​(java.lang.String key)
      Removes an attribute from the page, if it exists.
      void setAcl​(Acl acl)
      Sets the Acl for this page.
      void setAttribute​(java.lang.String key, java.lang.Object attribute)
      Sets an metadata attribute.
      void setAuthor​(java.lang.String author)
      Sets the author of the page.
      void setHasMetadata()
      Sets the metadata flag to true.
      void setLastModified​(java.util.Date date)
      Sets the last modification date.
      void setSize​(long size)
      Sets the size.
      void setVersion​(int version)
      Sets the page version.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the name of the page.
        Returns:
        The page name.
      • getLastModified

        java.util.Date getLastModified()
        Returns the date when this page was last modified.
        Returns:
        The last modification date
      • setLastModified

        void setLastModified​(java.util.Date date)
        Sets the last modification date. In general, this is only changed by the provider.
        Parameters:
        date - The date
      • setVersion

        void setVersion​(int version)
        Sets the page version. In general, this is only changed by the provider.
        Parameters:
        version - The version number
      • getVersion

        int getVersion()
        Returns the version that this WikiPage instance represents.
        Returns:
        the version number of this page.
      • getSize

        long getSize()
        Returns the size of the page.
        Returns:
        the size of the page.
        Since:
        2.1.109
      • setSize

        void setSize​(long size)
        Sets the size. Typically called by the provider only.
        Parameters:
        size - The size of the page.
        Since:
        2.1.109
      • setAuthor

        void setAuthor​(java.lang.String author)
        Sets the author of the page. Typically called only by the provider.
        Parameters:
        author - The author name.
      • getAuthor

        java.lang.String getAuthor()
        Returns author name, or null, if no author has been defined.
        Returns:
        Author name, or possibly null.
      • getWiki

        java.lang.String getWiki()
        Returns the wiki name for this page
        Returns:
        The name of the wiki.
      • invalidateMetadata

        void invalidateMetadata()
        This method will remove all metadata from the page.
      • hasMetadata

        boolean hasMetadata()
        Returns true if the page has valid metadata; that is, it has been parsed. Note that this method is a kludge to support our pre-3.0 metadata system, and as such will go away with the new API.
        Returns:
        true, if the page has metadata.
      • setHasMetadata

        void setHasMetadata()
        Sets the metadata flag to true. Never call.
      • getAttribute

        <T> T getAttribute​(java.lang.String key)
        A WikiPage may have a number of attributes, which might or might not be available. Typically attributes are things that do not need to be stored with the wiki page to the page repository, but are generated on-the-fly. A provider is not required to save them, but they can do that if they really want.
        Parameters:
        key - The key using which the attribute is fetched
        Returns:
        The attribute. If the attribute has not been set, returns null.
      • setAttribute

        void setAttribute​(java.lang.String key,
                          java.lang.Object attribute)
        Sets an metadata attribute.
        Parameters:
        key - The key for the attribute used to fetch the attribute later on.
        attribute - The attribute value
        See Also:
        getAttribute(String)
      • removeAttribute

        <T> T removeAttribute​(java.lang.String key)
        Removes an attribute from the page, if it exists.
        Parameters:
        key - The key for the attribute
        Returns:
        If the attribute existed, returns the object.
        Since:
        2.1.111
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Returns the full attributes Map, in case external code needs to iterate through the attributes.
        Returns:
        The attribute Map. Please note that this is a direct reference, not a copy.
      • getAcl

        Acl getAcl()
        Returns the Acl for this page. May return null, in case there is no Acl defined, or it has not yet been set by setAcl(Acl).
        Returns:
        The access control list. May return null, if there is no acl.