Interface AuthorDocumentProvider


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface AuthorDocumentProvider
    Use this API to access an "in memory" representation of an author document over a resource and customize the document in a non visual way using the AuthorDocumentController and AuthorDocument API.
    Since:
    22.1
    • Method Detail

      • getAuthorDocumentController

        AuthorDocumentController getAuthorDocumentController()
        Access the author document controller. You can use it to make changes to the structure of nodes, run XPath expressions to identify nodes and much more.
        Returns:
        The AuthorDocumentController.
      • getContentReader

        java.io.Reader getContentReader()
        Create a reader over the nodes structure.
        Returns:
        The reader over the created author document.
      • getContentInputStream

        java.io.InputStream getContentInputStream()
                                           throws java.io.IOException
        Create an input stream over the nodes structure.
        Returns:
        The input stream over the created author document.
        Throws:
        java.io.IOException
        Since:
        23
      • save

        void save()
           throws java.io.IOException
        Saves the content to the original load location.
        Throws:
        java.io.IOException - If saving error occurs.
      • getStyles

        Styles getStyles​(AuthorNode node)
        Get the CSS styles which are used to render a particular Author node. This method MUST only be used to query styles.
        Parameters:
        node - The node for which we want to obtain the styles.
        Returns:
        the styles associated with the node or null.
        Since:
        24