Class OnlyofficeEditorServiceImpl

  • All Implemented Interfaces:
    OnlyofficeEditorService, org.picocontainer.Startable

    public class OnlyofficeEditorServiceImpl
    extends Object
    implements OnlyofficeEditorService, org.picocontainer.Startable
    Service implementing OnlyofficeEditorService and Startable. This component handles interactions with Onlyoffice Document Server and related eXo user states.
    Created by The eXo Platform SAS.
    Version:
    $Id: OnlyofficeEditorServiceImpl.java 00000 Jan 31, 2016 pnedonosko $
    Author:
    Peter Nedonosko
    • Field Detail

      • LOG

        protected static final org.exoplatform.services.log.Log LOG
        The Constant LOG.
      • RANDOM

        protected static final Random RANDOM
        The Constant RANDOM.
      • CONFIG_DS_ACCESS_ONLY

        public static final String CONFIG_DS_ACCESS_ONLY
        The Constant CONFIG_DS_ACCESS_ONLY.
        See Also:
        Constant Field Values
      • CONFIG_DS_ALLOWEDHOSTS

        public static final String CONFIG_DS_ALLOWEDHOSTS
        Configuration key for Document Server's allowed hosts in requests from a DS to eXo side.
        See Also:
        Constant Field Values
      • HTTP_PORT_DELIMITER

        protected static final char HTTP_PORT_DELIMITER
        The Constant HTTP_PORT_DELIMITER.
        See Also:
        Constant Field Values
      • LAST_EDITED_DATE_FORMAT

        protected static final String LAST_EDITED_DATE_FORMAT
        The date format for Last Edited in editor bar
        See Also:
        Constant Field Values
      • FILE_EXPLORER_URL_SYNTAX

        protected static final Pattern FILE_EXPLORER_URL_SYNTAX
        The Consant FILE_EXPLORER_URL_SYNTAX.
      • LOCK_WAIT_ATTEMTS

        protected static final int LOCK_WAIT_ATTEMTS
        The Constant LOCK_WAIT_ATTEMTS.
        See Also:
        Constant Field Values
      • LOCK_WAIT_TIMEOUT

        protected static final long LOCK_WAIT_TIMEOUT
        The Constant LOCK_WAIT_TIMEOUT.
        See Also:
        Constant Field Values
      • EMPTY_TEXT

        protected static final String EMPTY_TEXT
        The Constant EMPTY_TEXT.
      • CACHE_NAME

        public static final String CACHE_NAME
        The Constant CACHE_NAME.
      • VIEWER_CACHE_NAME

        public static final String VIEWER_CACHE_NAME
        The Constant VIEWER_CACHE_NAME.
      • jcrService

        protected final org.exoplatform.services.jcr.RepositoryService jcrService
        The jcr service.
      • sessionProviders

        protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
        The session providers.
      • identityRegistry

        protected final org.exoplatform.services.security.IdentityRegistry identityRegistry
        The identity registry.
      • finder

        protected final NodeFinder finder
        The finder.
      • organization

        protected final org.exoplatform.services.organization.OrganizationService organization
        The organization.
      • authenticator

        protected final org.exoplatform.services.security.Authenticator authenticator
        The authenticator.
      • documentService

        protected final org.exoplatform.services.cms.documents.DocumentService documentService
        The document service.
      • lockService

        protected final org.exoplatform.services.cms.lock.LockService lockService
        The lock service.
      • listenerService

        protected final org.exoplatform.services.listener.ListenerService listenerService
        The listener service.
      • trashService

        protected final org.exoplatform.services.cms.documents.TrashService trashService
        The trash service.
      • spaceService

        protected final org.exoplatform.social.core.space.spi.SpaceService spaceService
        The space service.
      • activityManager

        protected final org.exoplatform.social.core.manager.ActivityManager activityManager
        The activity manager.
      • hierarchyCreator

        protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator
        The node hierarchy creator.
      • manageDriveService

        protected final org.exoplatform.services.cms.drives.ManageDriveService manageDriveService
        The manage drive service
      • activeLock

        protected final ReentrantLock activeLock
        Lock for updating Editing documents cache.
      • uploadUrl

        protected final String uploadUrl
        The upload url.
      • documentserverHostName

        protected final String documentserverHostName
        The documentserver host name.
      • documentserverUrl

        protected final String documentserverUrl
        The documentserver url.
      • commandServiceUrl

        protected final String commandServiceUrl
        The document command service url.
      • documentserverSecret

        protected final String documentserverSecret
        The document server secret.
      • documentserverAccessOnly

        protected final boolean documentserverAccessOnly
        The documentserver access only.
      • groupsPath

        protected final String groupsPath
        The group drives path in JCR.
      • usersPath

        protected final String usersPath
        The user drives paths in JCR.
      • documentserverAllowedhosts

        protected final Set<String> documentserverAllowedhosts
        The documentserver allowed hosts (can be empty if not configured).
      • fileTypes

        protected final Map<String,​String> fileTypes
        The file types.
      • documentTypePlugin

        protected DocumentTypePlugin documentTypePlugin
        The document type plugin.
    • Constructor Detail

      • OnlyofficeEditorServiceImpl

        public OnlyofficeEditorServiceImpl​(org.exoplatform.services.jcr.RepositoryService jcrService,
                                           org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
                                           org.exoplatform.services.security.IdentityRegistry identityRegistry,
                                           NodeFinder finder,
                                           org.exoplatform.services.organization.OrganizationService organization,
                                           org.exoplatform.services.security.Authenticator authenticator,
                                           org.exoplatform.services.cache.CacheService cacheService,
                                           org.exoplatform.services.cms.documents.DocumentService documentService,
                                           org.exoplatform.services.cms.lock.LockService lockService,
                                           org.exoplatform.services.listener.ListenerService listenerService,
                                           org.exoplatform.services.cms.documents.TrashService trashService,
                                           org.exoplatform.social.core.space.spi.SpaceService spaceService,
                                           org.exoplatform.social.core.manager.ActivityManager activityManager,
                                           org.exoplatform.services.cms.drives.ManageDriveService manageDriveService,
                                           org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
                                           org.exoplatform.container.xml.InitParams params)
                                    throws org.exoplatform.container.configuration.ConfigurationException
        Cloud Drive service with storage in JCR and with managed features.
        Parameters:
        jcrService - RepositoryService
        sessionProviders - SessionProviderService
        identityRegistry - the identity registry
        finder - the finder
        organization - the organization
        authenticator - the authenticator
        cacheService - the cache service
        documentService - the document service (ECMS)
        lockService - the lock service
        listenerService - the listener service
        trashService - the trashService
        spaceService - the spaceService
        activityManager - the activityManager
        manageDriveService - the manageDriveService
        hierarchyCreator - the hierarchyCreator
        params - the params
        Throws:
        org.exoplatform.container.configuration.ConfigurationException - the configuration exception
    • Method Detail

      • getEditor

        protected Config getEditor​(String userId,
                                   String docId,
                                   boolean createCoEditing)
                            throws OnlyofficeEditorException,
                                   javax.jcr.RepositoryException
        Gets the editor.
        Parameters:
        userId - the user id
        docId - the node docId
        createCoEditing - if true and has no editor for given user, create a copy for co-editing if document already editing by other users
        Returns:
        the editor
        Throws:
        OnlyofficeEditorException - the onlyoffice editor exception
        javax.jcr.RepositoryException - the repository exception
      • canDownloadBy

        public boolean canDownloadBy​(String hostName)
        Check does given host can download document content by this service. It's optional feature, configurable and allow only configured Document server by default.
        Specified by:
        canDownloadBy in interface OnlyofficeEditorService
        Parameters:
        hostName - String
        Returns:
        true if client host with given name can download document content, false otherwise.
      • initDocument

        public String initDocument​(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
        Inits the document and returns an ID for use within editors. Node may be saved by this method if ID generation will be required, in this case it should be allowed to edit the node (not locked and user has write permissions).
        Specified by:
        initDocument in interface OnlyofficeEditorService
        Parameters:
        node - the node of the document
        Returns:
        the string with document ID for use within editors
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • getDocumentById

        public javax.jcr.Node getDocumentById​(String workspace,
                                              String uuid)
                                       throws javax.jcr.RepositoryException,
                                              DocumentNotFoundException
        Gets the document node by its id and optionally a repository workspace.
        Specified by:
        getDocumentById in interface OnlyofficeEditorService
        Parameters:
        workspace - the workspace, can be null, then a default one will be used
        uuid - the id of a document
        Returns:
        the document or null if nothing found
        Throws:
        javax.jcr.RepositoryException - the repository exception
        DocumentNotFoundException - the document not found exception
      • getVersions

        public List<Version> getVersions​(String workspace,
                                         String docId,
                                         int itemParPage,
                                         int pageNum)
                                  throws Exception
        get the list of versions of the document with the given id.
        Specified by:
        getVersions in interface OnlyofficeEditorService
        Parameters:
        workspace - the workspace
        docId - the document id
        itemParPage - the versions par page
        pageNum - the page number to load
        Returns:
        list of versions for node
        Throws:
        Exception - the exception
      • getDocument

        public javax.jcr.Node getDocument​(String workspace,
                                          String path)
                                   throws javax.jcr.RepositoryException,
                                          BadParameterException
        Gets the document node by its path and optionally a repository workspace.
        Specified by:
        getDocument in interface OnlyofficeEditorService
        Parameters:
        workspace - the workspace, can be null, then a default one will be used
        path - the path of a document
        Returns:
        the document or null if nothing found
        Throws:
        javax.jcr.RepositoryException - the repository exception
        BadParameterException - the bad parameter exeption
      • start

        public void start()
        On-start initializer.
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        On-stop finalizer.
        Specified by:
        stop in interface org.picocontainer.Startable
      • addTypePlugin

        public void addTypePlugin​(org.exoplatform.container.component.ComponentPlugin plugin)
        Adds DocumentTypePlugin to the service to check mimetypes of documents.
        Specified by:
        addTypePlugin in interface OnlyofficeEditorService
        Parameters:
        plugin - - the plugin to be added
      • canEditDocument

        public boolean canEditDocument​(javax.jcr.Node node)
                                throws javax.jcr.RepositoryException
        Checks if the node isn't locked and can be edited by the current user.
        Specified by:
        canEditDocument in interface OnlyofficeEditorService
        Parameters:
        node - the node
        Returns:
        true, if the current user can edit the node
        Throws:
        javax.jcr.RepositoryException - the repository exeption
      • isDocumentMimeSupported

        public boolean isDocumentMimeSupported​(javax.jcr.Node node)
                                        throws javax.jcr.RepositoryException
        Checks if the node has compatible mime-types.
        Specified by:
        isDocumentMimeSupported in interface OnlyofficeEditorService
        Parameters:
        node - the node
        Returns:
        true, if the node mime-types are supported
        Throws:
        javax.jcr.RepositoryException - the repository exeption
      • downloadVersion

        public void downloadVersion​(String userId,
                                    String key,
                                    boolean coEdited,
                                    boolean forcesaved,
                                    String comment,
                                    String contentUrl)
        Builds status object based on params. Obtains the config
        Specified by:
        downloadVersion in interface OnlyofficeEditorService
        Parameters:
        userId - the userId
        key - the key
        coEdited - the coEdited
        forcesaved - the forceSaved
        comment - the comment
        contentUrl - the contentUrl
      • forceSave

        public void forceSave​(String userId,
                              String key,
                              boolean download,
                              boolean coEdit,
                              boolean forcesaved,
                              String comment)
        Forces saving a document on document server.
        Specified by:
        forceSave in interface OnlyofficeEditorService
        Parameters:
        userId - the userId
        key - the key
        download - the download
        coEdit - the coedit
        forcesaved - the forcesaved
        comment - the comment
      • validateToken

        public boolean validateToken​(String token,
                                     String key)
        Description copied from interface: OnlyofficeEditorService
        Validates the JWT token received from the document server.
        Specified by:
        validateToken in interface OnlyofficeEditorService
        Parameters:
        token - the token
        key - the document key
        Returns:
        true, if the token is correct, false otherwise
      • addFilePreferences

        public void addFilePreferences​(javax.jcr.Node node,
                                       String userId,
                                       String path)
                                throws javax.jcr.RepositoryException
        Addds file preferences to the node (path for opening shared doc for particular user).
        Specified by:
        addFilePreferences in interface OnlyofficeEditorService
        Parameters:
        node - the node
        userId - the userId
        path - the path
        Throws:
        javax.jcr.RepositoryException - the repositoryException
      • saveLink

        protected void saveLink​(String userId,
                                String key,
                                String url)
        Save link.
        Parameters:
        userId - the userId
        key - the key
        url - the url
      • downloadClosed

        protected void downloadClosed​(DocumentStatus status)
        Downloads document's content to the JCR node when the editor is closed.
        Parameters:
        status - the status
      • nodeTitle

        protected String nodeTitle​(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
        Node title.
        Parameters:
        node - the node
        Returns:
        the string
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • fileType

        protected String fileType​(javax.jcr.Node node)
                           throws javax.jcr.RepositoryException
        File type.
        Parameters:
        node - the node
        Returns:
        the string
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • documentType

        protected String documentType​(String fileType)
        Document type.
        Parameters:
        fileType - the file type
        Returns:
        the string
      • getMimeType

        public static String getMimeType​(javax.jcr.Node node)
        Get the MimeType
        Parameters:
        node - the node
        Returns:
        the MimeType
      • nodeContent

        protected javax.jcr.Node nodeContent​(javax.jcr.Node node)
                                      throws javax.jcr.RepositoryException
        Node content.
        Parameters:
        node - the node
        Returns:
        the node
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • nodeCreated

        protected Calendar nodeCreated​(javax.jcr.Node node)
                                throws javax.jcr.RepositoryException
        Node created.
        Parameters:
        node - the node
        Returns:
        the calendar
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • mimeType

        protected String mimeType​(javax.jcr.Node content)
                           throws javax.jcr.RepositoryException
        Mime type.
        Parameters:
        content - the content
        Returns:
        the string
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • data

        protected javax.jcr.Property data​(javax.jcr.Node content)
                                   throws javax.jcr.RepositoryException
        Data.
        Parameters:
        content - the content
        Returns:
        the property
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • generateId

        protected UUID generateId​(String workspace,
                                  String path)
        Generate id.
        Parameters:
        workspace - the workspace
        path - the path
        Returns:
        the uuid
      • nodePath

        protected String nodePath​(String workspace,
                                  String path)
        Node path with the pattern workspace:path/to/node.
        Parameters:
        workspace - the workspace
        path - the path
        Returns:
        the string
      • nodePath

        protected String nodePath​(Config config)
        Node path with the pattern workspace:path/to/node.
        Parameters:
        config - the config
        Returns:
        the string
      • syncUsers

        protected boolean syncUsers​(ConcurrentMap<String,​Config> configs,
                                    String[] users)
        Sync users.
        Parameters:
        configs - the configs
        users - the users
        Returns:
        true, if actually changed editor config user(s)
      • getActiveUsers

        protected String[] getActiveUsers​(ConcurrentMap<String,​Config> configs)
        Gets the current users.
        Parameters:
        configs - the configs
        Returns:
        the current users
      • downloadVersion

        protected void downloadVersion​(DocumentStatus status)
        Downloads document's content to the JCR node creating a new version.
        Parameters:
        status - the status
      • download

        protected void download​(DocumentStatus status)
                         throws OnlyofficeEditorException,
                                javax.jcr.RepositoryException
        Downloads document's content to the JCR node.
        Parameters:
        status - the status
        Throws:
        OnlyofficeEditorException - the OnlyofficeEditorException
        javax.jcr.RepositoryException - the RepositoryException
      • updateCache

        protected void updateCache​(Config config)
        Updates config in the activeCache.
        Parameters:
        config - the config
      • createVersionOfDraft

        protected void createVersionOfDraft​(javax.jcr.Node node)
                                     throws javax.jcr.RepositoryException,
                                            OnlyofficeEditorException
        Creates a version of draft. Used to create version after manually uploaded content.
        Parameters:
        node - the node
        Throws:
        javax.jcr.RepositoryException - the repository exception
        OnlyofficeEditorException - the onlyoffice exception
      • node

        protected javax.jcr.Node node​(String workspace,
                                      String path)
                               throws BadParameterException,
                                      javax.jcr.RepositoryException
        Node.
        Parameters:
        workspace - the workspace
        path - the path
        Returns:
        the node
        Throws:
        BadParameterException - the bad parameter exception
        javax.jcr.RepositoryException - the repository exception
      • systemNode

        protected javax.jcr.Node systemNode​(String workspace,
                                            String path)
                                     throws BadParameterException,
                                            javax.jcr.RepositoryException
        System node.
        Parameters:
        workspace - the workspace
        path - the path
        Returns:
        the node
        Throws:
        BadParameterException - the bad parameter exception
        javax.jcr.RepositoryException - the repository exception
      • nodeByUUID

        protected javax.jcr.Node nodeByUUID​(String workspace,
                                            String uuid)
                                     throws javax.jcr.RepositoryException
        Node by UUID.
        Parameters:
        workspace - the workspace
        uuid - the UUID
        Returns:
        the node
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • checkout

        protected boolean checkout​(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
        Checkout.
        Parameters:
        node - the node
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • unlock

        protected void unlock​(javax.jcr.Node node,
                              org.exoplatform.onlyoffice.OnlyofficeEditorServiceImpl.LockState lock)
                       throws OnlyofficeEditorException,
                              javax.jcr.RepositoryException
        Unlock given node.
        Parameters:
        node - the node
        lock - the lock
        Throws:
        OnlyofficeEditorException - the onlyoffice editor exception
        javax.jcr.RepositoryException - the repository exception
      • lock

        protected org.exoplatform.onlyoffice.OnlyofficeEditorServiceImpl.LockState lock​(javax.jcr.Node node,
                                                                                        Config config)
                                                                                 throws OnlyofficeEditorException,
                                                                                        javax.jcr.RepositoryException
        Lock the node by current user. If lock attempts will succeed in predefined time this method will throw OnlyofficeEditorException. If node isn't mix:lockable it will be added first and node saved.
        Parameters:
        node - Node
        config - Config
        Returns:
        Lock acquired by current user.
        Throws:
        OnlyofficeEditorException - the onlyoffice editor exception
        javax.jcr.RepositoryException - the repository exception
      • getUserLang

        protected String getUserLang​(String userId)
        Gets the user lang.
        Parameters:
        userId - the user id
        Returns:
        the lang can be null if user has no profile or language in it or user profile error
      • platformUrl

        protected StringBuilder platformUrl​(String schema,
                                            String host,
                                            int port)
        Platform url.
        Parameters:
        schema - the schema
        host - the host
        port - the port
        Returns:
        the string builder
      • explorerUrl

        @Deprecated
        protected StringBuilder explorerUrl​(String schema,
                                            String host,
                                            int port,
                                            String ecmsURL)
        Deprecated.
        ECMS explorer page URL.
        Parameters:
        schema - the schema
        host - the host
        port - the port
        ecmsURL - the ECMS URL
        Returns:
        the string builder
      • explorerUri

        protected URI explorerUri​(String schema,
                                  String host,
                                  int port,
                                  String ecmsLink)
        Explorer uri.
        Parameters:
        schema - the schema
        host - the host
        port - the port
        ecmsLink - the ecms link
        Returns:
        the uri
      • explorerLink

        protected String explorerLink​(String jcrPath)
        ECMS explorer page relative URL (within the Platform).
        Parameters:
        jcrPath - the jcr path
        Returns:
        the string
      • platformRestUrl

        protected StringBuilder platformRestUrl​(CharSequence platformUrl)
        Platform REST URL.
        Parameters:
        platformUrl - the platform URL
        Returns:
        the string builder
      • broadcastEvent

        protected void broadcastEvent​(DocumentStatus status,
                                      String eventType)
        Broadcasts an event using the listenerService.
        Parameters:
        status - the status
        eventType - the eventType
      • fireCreated

        protected void fireCreated​(DocumentStatus status)
        Fire created.
        Parameters:
        status - the status
      • fireGet

        protected void fireGet​(DocumentStatus status)
        Fire get.
        Parameters:
        status - the status
      • fireJoined

        protected void fireJoined​(DocumentStatus status)
        Fire joined.
        Parameters:
        status - the status
      • fireLeaved

        protected void fireLeaved​(DocumentStatus status)
        Fire leaved.
        Parameters:
        status - the status
      • fireSaved

        protected void fireSaved​(DocumentStatus status)
        Fire saved.
        Parameters:
        status - the status
      • fireError

        protected void fireError​(DocumentStatus status)
        Fire error.
        Parameters:
        status - the status
      • userIdentity

        protected org.exoplatform.services.security.Identity userIdentity​(String userId)
        Find or create user identity.
        Parameters:
        userId - the user id
        Returns:
        the identity can be null if not found and cannot be created via current authenticator
      • lowerCase

        protected String lowerCase​(String str)
        Get lower case copy of the given string.
        Parameters:
        str - the str
        Returns:
        the string
      • logError

        protected void logError​(String userId,
                                String path,
                                String docId,
                                String key,
                                String reason)
        Logs editor errors.
        Parameters:
        userId - the userId
        path - the path
        docId - the docId
        key - the key
        reason - the reason
      • setUserConvoState

        protected boolean setUserConvoState​(String userId)
        Sets ConversationState by userId.
        Parameters:
        userId - the userId
        Returns:
        true if successful, false when the user is not found
      • restoreConvoState

        protected void restoreConvoState​(org.exoplatform.services.security.ConversationState contextState,
                                         org.exoplatform.services.jcr.ext.common.SessionProvider contextProvider)
        Restores the conversation state.
        Parameters:
        contextState - the contextState
        contextProvider - the contextProvider
      • initFileTypes

        protected void initFileTypes()
        Initializes fileTypes map
      • addDebugCacheListener

        protected void addDebugCacheListener()
        Adds debug listener to active cache
      • getDocumentserverHost

        protected String getDocumentserverHost​(String dsSchema,
                                               String dsHost)
                                        throws org.exoplatform.container.configuration.ConfigurationException
        Gets documentserver host name.
        Parameters:
        dsSchema - the dsSchema
        dsHost - the dsHost
        Returns:
        hostname
        Throws:
        org.exoplatform.container.configuration.ConfigurationException - the configurationException
      • getDocumentserverAllowedHosts

        protected Set<String> getDocumentserverAllowedHosts​(String dsAllowedHost)
        Gets allowed hosts.
        Parameters:
        dsAllowedHost - the dsAllowedHost
        Returns:
        allowed hosts
      • getDrive

        protected String getDrive​(javax.jcr.Node node)
        Gets drive.
        Parameters:
        node - the node
        Returns:
        the drive name
      • getDisplayPath

        protected String getDisplayPath​(javax.jcr.Node node,
                                        String userId)
        Gets display path.
        Parameters:
        node - the node
        userId - the userId
        Returns:
        the display path
      • getSymlink

        protected javax.jcr.Node getSymlink​(javax.jcr.Node node,
                                            String userId)
                                     throws Exception
        Gets parent folder of the file based on file preferences
        Parameters:
        node - the node
        userId - the userId
        Returns:
        the Node
        Throws:
        Exception - the exception
      • getUserId

        protected String getUserId​(String path)
        Gets userId from node path.
        Parameters:
        path - the node path
        Returns:
        the userId
      • nodeComment

        protected String nodeComment​(javax.jcr.Node node)
        Gets comment of last version of node
        Parameters:
        node - the node
        Returns:
        the comment or null
      • canRenameDocument

        protected boolean canRenameDocument​(javax.jcr.Node node)
        Checks if current user can rename the document.
        Parameters:
        node - the node
        Returns:
        true if user can rename
      • getLastModified

        protected String getLastModified​(javax.jcr.Node node)
                                  throws javax.jcr.ValueFormatException,
                                         javax.jcr.PathNotFoundException,
                                         javax.jcr.RepositoryException
        Gets lastmodified from node.
        Parameters:
        node - the node
        Returns:
        the lastmodified
        Throws:
        javax.jcr.ValueFormatException - the valueFormatException
        javax.jcr.PathNotFoundException - the pathNotFoundException
        javax.jcr.RepositoryException - the repositoryException
      • getLastModifier

        protected String getLastModifier​(javax.jcr.Node node)
                                  throws javax.jcr.ValueFormatException,
                                         javax.jcr.PathNotFoundException,
                                         javax.jcr.RepositoryException,
                                         OnlyofficeEditorException
        Gets last modifier display name from node.
        Parameters:
        node - the node.
        Returns:
        the display name of last modifier
        Throws:
        javax.jcr.ValueFormatException - the valueFormatException
        javax.jcr.PathNotFoundException - the pathNotFoundException
        javax.jcr.RepositoryException - the repositoryException
        OnlyofficeEditorException - the onlyofficeEditorException
      • isSuspendDownloadDocument

        protected boolean isSuspendDownloadDocument()