Class WebappAuthorDocumentFactory
java.lang.Object
ro.sync.ecss.extensions.api.webapp.WebappAuthorDocumentFactory
- All Implemented Interfaces:
WebappAuthorDocumentFactoryConstants
@API(type=NOT_EXTENDABLE,
src=PRIVATE)
public final class WebappAuthorDocumentFactory
extends Object
implements WebappAuthorDocumentFactoryConstants
Factory class that creates the document model to be used in the Web Reviewer.
- Since:
- 15.1
-
Field Summary
Fields inherited from interface ro.sync.ecss.extensions.api.webapp.WebappAuthorDocumentFactoryConstants
EDITING_CONTEXT_MODEL_ATTR
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorDocumentModel
createAuthorDocumentInfo
(String systemID, Reader docReader, Map<String, ?> sessionAttributes) Factory method that creates a document model for the document with the specified systemID.static AuthorDocumentModel
createAuthorDocumentInfo
(String systemID, Map<String, ?> sessionAttributes) Factory method that creates a document model for the document with the specified systemID.static AuthorDocumentModel
createAuthorDocumentInfo
(URL systemIdUrl, Reader docReader, List bomBytes, Map<String, ?> sessionAttributes) Factory method that creates a document model for the document with the specified systemID.static DITAMapDocumentModel
createDITAMapDocumentInfo
(String systemID, Reader docReader, Map<String, ?> sessionAttributes) Factory method that creates an editable DITA Map document model for the document with the specified systemID.static DITAMapDocumentModel
createDITAMapDocumentInfo
(String systemID, Map<String, ?> sessionAttributes) Factory method that creates an editable DITA Map document model for the document with the specified systemID.static DITAMapDocumentModel
createDITAMapDocumentInfo
(URL systemIdUrl, Reader docReader, List bomBytes, Map<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 Reader
Returns a reader over the plugins WebappCSSResource files.static Reader
Returns a reader over all JS files from the plugins.static void
init()
Initialize the web application.static void
setFrameworks
(File frameworksDir) Sets the folder that contains the frameworks.static void
setOptions
(File workDir, String optionsFileName) Sets the file to be used to load the oxygen options.static void
setPlugins
(File workDir) Deprecated.static void
setPlugins
(File pluginsDir, File userUploadedPluginsDir) Sets the folder that contains the plugins.static void
setUserFrameworks
(File userFrameworksDir) Sets the folder that contains the frameworks the user has uploaded.
-
Method Details
-
createDITAMapDocumentInfo
public static DITAMapDocumentModel createDITAMapDocumentInfo(URL systemIdUrl, Reader docReader, List bomBytes, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
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(URL systemIdUrl, Reader docReader, List bomBytes, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
SAXException
-
createAuthorDocumentInfo
public static AuthorDocumentModel createAuthorDocumentInfo(String systemID, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
SAXException
-
createAuthorDocumentInfo
public static AuthorDocumentModel createAuthorDocumentInfo(String systemID, Reader docReader, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
SAXException
-
setOptions
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:
MalformedURLException
- Unable to set the working dir.
-
setFrameworks
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:
MalformedURLException
- If the framework's directory URL is malformed.
-
setUserFrameworks
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:
MalformedURLException
- If the framework's directory URL is malformed.
-
setPlugins
Deprecated.use {setPlugins(File, File)
.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
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
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
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. -
getInitializationFatalError
- Returns:
- Fatal error that occurred during initialization. This can be presented in browser when trying to access Web Author.
-
dispose
public static void dispose()Disposes any resources used by the document factory. -
createDITAMapDocumentInfo
public static DITAMapDocumentModel createDITAMapDocumentInfo(String systemID, Reader docReader, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
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(String systemID, Map<String, ?> sessionAttributes) throws IOException, SAXExceptionFactory 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:
IOException
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.
-
setPlugins(File, File)
.