Interface AuthorDocumentModel
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
DITAMapDocumentModel
The model of an XML document to be edited.
It has the following components:
- some associated CSS files
- a schema used to validate the document and to propose elements to be inserted in a specific context.
- a set of markers added by reviewers
- a selection model
- an undo manager that supports undoable edits
- Since:
- 15.1
-
Method Summary
Modifier and TypeMethodDescriptionReturns a reader over the document.ro.sync.ecss.extensions.api.webapp.AuthorNodesRenderer
createRenderer
(Writer writer) Returns a renderer of the document to the specified writer.ro.sync.ecss.extensions.api.webapp.AuthorNodesRenderer
createRenderer
(Writer writer, AuthorHighlighter highlighter) Returns a renderer of the document to the specified writer.void
dispose()
Dispose the current document.Returns the schema aware actions handler.Returns the attribute manager offering attributes support.Returns the Autor access object.Getter for the document controller.Returns the content completion manager that can be used to insert XML tags in the document such that the document remains valid according to its schema.TODO (EXM-27739): split it into document-specific and doctype specific CSS in order to allow separate caching.ro.sync.exml.editor.xmleditor.DocumentTypeProvider
Get document type provider.Returns the id of the document type of the document.getDPILocation
(DocumentPositionedInfo dpInfo) Deprecated.Returns the form control editing helper.The support object for find and replace actions.Returns the CSS that describes floating tool-bars as JSON.Return an indexer that assigned IDs to all markers in the document.Returns the message reporter.Returns an indexer that assigned IDs to the nodes in the document.Get the profiling condition attributes manager.ro.sync.quickfix.QuickFixExecutor
Returns a review controller that can be used to perform actions on the markers present in the document.Returns the selection model of the document.The ID that uniquely identifies the user that opened the document.List<ro.sync.exml.editor.scenario.BaseScenario>
Deprecated.use {getDocumentValidator()
.Deprecated.use {getDocumentValidator()
.Exposes some of the WSEditor functionality for the current document.void
Sets the user id.
-
Method Details
-
getAuthorDocumentController
AuthorDocumentController getAuthorDocumentController()Getter for the document controller. The controller is used to perform undoable edits on the document content.- Returns:
- the document controller.
-
createRenderer
Returns a renderer of the document to the specified writer.- Parameters:
writer
- The writer- Returns:
- The renderer
- 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.
-
createRenderer
ro.sync.ecss.extensions.api.webapp.AuthorNodesRenderer createRenderer(Writer writer, AuthorHighlighter highlighter) Returns a renderer of the document to the specified writer.- Parameters:
writer
- The writerhighlighter
- The author highligher- Returns:
- The renderer
- 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.
-
createReader
Reader createReader()Returns a reader over the document. The reader serializes the current content of the document trying to match the indentation and line-width that were used in the document before the editing started.- Returns:
- a reader over the document.
-
getNodeIndexer
AuthorIdIndex<AuthorNode> getNodeIndexer()Returns an indexer that assigned IDs to the nodes in the document. Note that only the rendered node have an ID assigned.- Returns:
- The node indexer.
-
getMarkersIndexer
AuthorIdIndex<AuthorPersistentHighlight> getMarkersIndexer()Return an indexer that assigned IDs to all markers in the document.- Returns:
- The marker indexer.
-
getCssContent
String getCssContent()TODO (EXM-27739): split it into document-specific and doctype specific CSS in order to allow separate caching. Returns the CSS to be applied to the HTML document.- Returns:
- The CSS to be applied to the HTML document.
-
getFloatingToolbarsJsonContent
String getFloatingToolbarsJsonContent()Returns the CSS that describes floating tool-bars as JSON.- Returns:
- the CSS that describes floating tool-bars as JSON.
-
getProfilingConditionAttributesManager
ProfilingConditionAttributesManager getProfilingConditionAttributesManager()Get the profiling condition attributes manager.- Returns:
- the profiling condition attributes manager.
- Since:
- 26
-
getReviewController
ReviewController getReviewController()Returns a review controller that can be used to perform actions on the markers present in the document.- Returns:
- The review controller.
-
getAttributesManager
AttributesManager getAttributesManager()Returns the attribute manager offering attributes support.- Returns:
- The attribute manager.
-
getContentCompletionManager
ContentCompletionManager getContentCompletionManager()Returns the content completion manager that can be used to insert XML tags in the document such that the document remains valid according to its schema.- Returns:
- The content completion manager.
-
getSelectionModel
AuthorSelectionAndCaretModel getSelectionModel()Returns the selection model of the document.- Returns:
- The selection model.
-
getValidationTask
Deprecated.use {getDocumentValidator()
.A task that tries to validate the document according to its schema and returns the list of found errors.- Returns:
- The validation task for the current document.
-
getEncoding
String getEncoding()- Returns:
- The encoding of the document in Java format.
-
getActionsManager
WebappActionsManager getActionsManager()- Returns:
- Actions support.
-
getEditingHelper
FormControlEditingHelper getEditingHelper()Returns the form control editing helper.- Returns:
- the form control editing helper.
-
getActionsSupport
WebappAuthorSchemaAwareActionsHandler getActionsSupport()Returns the schema aware actions handler.- Returns:
- The schema aware actions handler.
-
getAuthorAccess
AuthorAccess getAuthorAccess()Returns the Autor access object.- Returns:
- Returns the author access object.
-
getMessageProvider
WebappMessagesProvider getMessageProvider()Returns the message reporter. It collects error/warning/info messages.- Returns:
- The message reporter.
-
getDocumentTypeId
String getDocumentTypeId()Returns the id of the document type of the document.- Returns:
- The id of the document type of the document.
-
getValidationScenarios
Deprecated.use {getDocumentValidator()
.Get validation scenarios associated with the document.- Returns:
- Validation scenarios associated with the document.
-
getDocTypeProvider
ro.sync.exml.editor.xmleditor.DocumentTypeProvider getDocTypeProvider()Get document type provider.- Returns:
- The document type provider.
-
getDPILocation
Deprecated.use {getDocumentValidator()
.Compute for the given document position info the content offsets.- Parameters:
dpInfo
- The document position info.- Returns:
- The DPI location info.
-
dispose
void dispose()Dispose the current document. Its use after disposal produce undefined behavior. -
getFindReplaceSupport
FindReplaceSupport getFindReplaceSupport()The support object for find and replace actions.- Returns:
- The support object for find and replace actions.
-
getWSEditor
WSEditor getWSEditor()Exposes some of the WSEditor functionality for the current document.- Returns:
- An WSEditor adapter.
-
getUserId
String getUserId()The ID that uniquely identifies the user that opened the document.- Returns:
- The ID of the user. By default we use the license ID.
-
setUserId
Sets the user id.- Parameters:
userId
- Sets the unique ID of the user that opened the document.
-
getLicenseeId
String getLicenseeId()- Returns:
- The licensee ID which is unique for each browser connected to the webapp, even if the same person uses multiple browsers.
-
getLockManager
WebappLockManager getLockManager()- Returns:
- The lock manager for this document.
-
getSpellchecker
WebappSpellchecker getSpellchecker()- Returns:
- The spellchecker for this document.
-
getQuickFixExecutor
ro.sync.quickfix.QuickFixExecutor getQuickFixExecutor()- Returns:
- The quick fix executor for the current document.
-
getDocumentValidator
WebappDocumentValidator getDocumentValidator()- Returns:
- An object that can be used to validate the content of the document.
- Since:
- 20.1
-
getDocumentValidator()
.