Class WebappAuthorDocumentFactory

    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static AuthorDocumentModel createAuthorDocumentInfo​(java.lang.String systemID, java.io.Reader docReader, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates a document model for the document with the specified systemID.
      static AuthorDocumentModel createAuthorDocumentInfo​(java.lang.String systemID, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates a document model for the document with the specified systemID.
      static AuthorDocumentModel createAuthorDocumentInfo​(java.net.URL systemIdUrl, java.io.Reader docReader, java.util.List bomBytes, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates a document model for the document with the specified systemID.
      static DITAMapDocumentModel createDITAMapDocumentInfo​(java.lang.String systemID, java.io.Reader docReader, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates an editable DITA Map document model for the document with the specified systemID.
      static DITAMapDocumentModel createDITAMapDocumentInfo​(java.lang.String systemID, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates an editable DITA Map document model for the document with the specified systemID.
      static DITAMapDocumentModel createDITAMapDocumentInfo​(java.net.URL systemIdUrl, java.io.Reader docReader, java.util.List bomBytes, java.util.Map<java.lang.String,​?> sessionAttributes)
      Factory method that creates an editable DITA Map document model for the document with the specified systemID.
      static void dispose()
      Disposes any resources used by the document factory.
      static java.io.Reader getPluginsCSS()
      Returns a reader over the plugins WebappCSSResource files.
      static java.io.Reader getPluginsJS()
      Returns a reader over all JS files from the plugins.
      static void init()
      Initialize the web application.
      static void setFrameworks​(java.io.File frameworksDir)
      Sets the folder that contains the frameworks.
      static void setOptions​(java.io.File workDir, java.lang.String optionsFileName)
      Sets the file to be used to load the oxygen options.
      static void setPlugins​(java.io.File workDir)
      Deprecated.
      static void setPlugins​(java.io.File pluginsDir, java.io.File userUploadedPluginsDir)
      Sets the folder that contains the plugins.
      static void setUserFrameworks​(java.io.File userFrameworksDir)
      Sets the folder that contains the frameworks the user has uploaded.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createDITAMapDocumentInfo

        public static DITAMapDocumentModel createDITAMapDocumentInfo​(java.net.URL systemIdUrl,
                                                                     java.io.Reader docReader,
                                                                     java.util.List bomBytes,
                                                                     java.util.Map<java.lang.String,​?> sessionAttributes)
                                                              throws java.io.IOException,
                                                                     org.xml.sax.SAXException
        Factory method that creates an editable DITA Map document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, etc.
        Parameters:
        systemIdUrl - The document URL.
        docReader - Reader over the document.
        bomBytes - BOM bytes.
        sessionAttributes - A map of session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        Since:
        26.1

        **************************************
        EXPERIMENTAL - Subject to change
        **************************************

        Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.

      • createAuthorDocumentInfo

        public static AuthorDocumentModel createAuthorDocumentInfo​(java.net.URL systemIdUrl,
                                                                   java.io.Reader docReader,
                                                                   java.util.List bomBytes,
                                                                   java.util.Map<java.lang.String,​?> sessionAttributes)
                                                            throws java.io.IOException,
                                                                   org.xml.sax.SAXException
        Factory method that creates a document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, CSS resources, etc.
        Parameters:
        systemIdUrl - The document URL.
        docReader - Reader over the document.
        bomBytes - BOM bytes.
        sessionAttributes - A map of session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
      • createAuthorDocumentInfo

        public static AuthorDocumentModel createAuthorDocumentInfo​(java.lang.String systemID,
                                                                   java.util.Map<java.lang.String,​?> sessionAttributes)
                                                            throws java.io.IOException,
                                                                   org.xml.sax.SAXException
        Factory method that creates a document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, CSS resources, etc.
        Parameters:
        systemID - The document URL.
        sessionAttributes - The session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
      • createAuthorDocumentInfo

        public static AuthorDocumentModel createAuthorDocumentInfo​(java.lang.String systemID,
                                                                   java.io.Reader docReader,
                                                                   java.util.Map<java.lang.String,​?> sessionAttributes)
                                                            throws java.io.IOException,
                                                                   org.xml.sax.SAXException
        Factory method that creates a document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, CSS resources, etc.
        Parameters:
        systemID - The document URL.
        docReader - Reader over the document.
        sessionAttributes - Session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
      • setOptions

        public static void setOptions​(java.io.File workDir,
                                      java.lang.String optionsFileName)
                               throws java.net.MalformedURLException
        Sets the file to be used to load the oxygen options. This method should be called before any other use of the Options singleton.
        Parameters:
        workDir - The directory in which the options file resides.
        optionsFileName - The name of the options file.
        Throws:
        java.net.MalformedURLException - Unable to set the working dir.
      • setFrameworks

        public static void setFrameworks​(java.io.File frameworksDir)
                                  throws java.net.MalformedURLException
        Sets the folder that contains the frameworks. This method should be called before creating any document models.
        Parameters:
        frameworksDir - The folder that contains the frameworks.
        Throws:
        java.net.MalformedURLException - If the framework's directory URL is malformed.
      • setUserFrameworks

        public static void setUserFrameworks​(java.io.File userFrameworksDir)
                                      throws java.net.MalformedURLException
        Sets the folder that contains the frameworks the user has uploaded. This method should be called before creating any document models.
        Parameters:
        userFrameworksDir - The folder that contains the user uploaded frameworks.
        Throws:
        java.net.MalformedURLException - If the framework's directory URL is malformed.
      • setPlugins

        @Deprecated
        public static void setPlugins​(java.io.File workDir)
        Deprecated.
        Sets the folder that contains the plugins. This method should be called before creating any document models.
        Parameters:
        workDir - The folder that contains the plugins.
      • setPlugins

        public static void setPlugins​(java.io.File pluginsDir,
                                      java.io.File userUploadedPluginsDir)
        Sets the folder that contains the plugins. This method should be called before creating any document models.
        Parameters:
        pluginsDir - The folder that contains the plugins.
        userUploadedPluginsDir - the directory holding the user uploaded plugins.
      • getPluginsJS

        public static java.io.Reader getPluginsJS()
        Returns a reader over all JS files from the plugins. Beside plugins options it contains some server-side options.
        Returns:
        The reader over the concatenated JS files from plugins.
      • getPluginsCSS

        public static java.io.Reader getPluginsCSS()
        Returns a reader over the plugins WebappCSSResource files.
        Returns:
        The reader over the concatenated CSS files from plugins.
      • init

        public static void init()
        Initialize the web application.
      • dispose

        public static void dispose()
        Disposes any resources used by the document factory.
      • createDITAMapDocumentInfo

        public static DITAMapDocumentModel createDITAMapDocumentInfo​(java.lang.String systemID,
                                                                     java.io.Reader docReader,
                                                                     java.util.Map<java.lang.String,​?> sessionAttributes)
                                                              throws java.io.IOException,
                                                                     org.xml.sax.SAXException
        Factory method that creates an editable DITA Map document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, etc.
        Parameters:
        systemID - The document URL.
        docReader - Reader over the document.
        sessionAttributes - Session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        Since:
        26.1

        **************************************
        EXPERIMENTAL - Subject to change
        **************************************

        Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.

      • createDITAMapDocumentInfo

        public static DITAMapDocumentModel createDITAMapDocumentInfo​(java.lang.String systemID,
                                                                     java.util.Map<java.lang.String,​?> sessionAttributes)
                                                              throws java.io.IOException,
                                                                     org.xml.sax.SAXException
        Factory method that creates an editable DITA Map document model for the document with the specified systemID. It takes care of detecting the encoding, resolving DTD, etc.
        Parameters:
        systemID - The document URL.
        sessionAttributes - The session attributes.
        Returns:
        The author document.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        Since:
        26.1

        **************************************
        EXPERIMENTAL - Subject to change
        **************************************

        Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.