Interface AuthorDocumentModel

  • All Superinterfaces:
    java.io.Serializable
    All Known Subinterfaces:
    DITAMapDocumentModel

    @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface AuthorDocumentModel
    extends java.io.Serializable
    The model of an XML document to be edited. It has the following components:
    1. some associated CSS files
    2. a schema used to validate the document and to propose elements to be inserted in a specific context.
    3. a set of markers added by reviewers
    4. a selection model
    5. an undo manager that supports undoable edits
    This class is a facade over all these components.
    Since:
    15.1
    • Method Detail

      • 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

        ro.sync.ecss.extensions.api.webapp.AuthorNodesRenderer createRenderer​(java.io.Writer writer)
        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​(java.io.Writer writer,
                                                                              AuthorHighlighter highlighter)
        Returns a renderer of the document to the specified writer.
        Parameters:
        writer - The writer
        highlighter - 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

        java.io.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.
      • getCssContent

        java.lang.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

        java.lang.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
        java.util.concurrent.Callable<java.util.List<DocumentPositionedInfo>> getValidationTask()
        Deprecated.
        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

        java.lang.String getEncoding()
        Returns:
        The encoding of the document in Java format.
      • getEditingHelper

        FormControlEditingHelper getEditingHelper()
        Returns the form control editing helper.
        Returns:
        the form control editing helper.
      • 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

        java.lang.String getDocumentTypeId()
        Returns the id of the document type of the document.
        Returns:
        The id of the document type of the document.
      • getValidationScenarios

        @Deprecated
        java.util.List<ro.sync.exml.editor.scenario.BaseScenario> getValidationScenarios()
        Deprecated.
        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
        DPILocation getDPILocation​(DocumentPositionedInfo dpInfo)
        Deprecated.
        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

        java.lang.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

        void setUserId​(java.lang.String userId)
        Sets the user id.
        Parameters:
        userId - Sets the unique ID of the user that opened the document.
      • getLicenseeId

        java.lang.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