Interface WebdavService

    • Method Detail

      • updateDocumentContent

        void updateDocumentContent​(SimpleDocument document)
        Update the document content language with the data from the associated webdav node.
        Parameters:
        document - the document for which the content language will be updated with data from webdav.
      • getContentEditionLanguage

        String getContentEditionLanguage​(SimpleDocument document)
        Gets the current content edition language of the specified attachment. If several webdav document exists (several content languages), then the one which has the highest modified date is taken into account.
        Parameters:
        document - the attachment.
        Returns:
        the content edition language if the specified attachment exists in the webdav repository, null otherwise.
        Throws:
        javax.jcr.RepositoryException
      • getContentEditionSize

        long getContentEditionSize​(SimpleDocument document)
        Gets the current content edition size of the specified attachment. If several webdav document exists (several content languages), then the one which has the highest modified date is taken into account.
        Parameters:
        document - the attachment.
        Returns:
        the content edition size if the specified attachment exists in the webdav repository, -1 otherwise.
        Throws:
        javax.jcr.RepositoryException
      • getDescriptor

        Optional<WebdavContentDescriptor> getDescriptor​(SimpleDocument document)
        Gets the current webdav descriptor of the specified attachment. If several webdav document exists (several content languages), then the one which has the highest modified date is taken into account.
        Parameters:
        document - the attachment.
        Returns:
        the optional content edition webdav descriptor if the specified attachment exists in the webdav repository.
      • updateContentFrom

        void updateContentFrom​(SimpleDocument document,
                               InputStream input)
                        throws IOException
        Updates a document content into the WEBDAV repository.

        If several webdav document exists (several content languages), then the one which has the highest modified date is taken into account.

        Parameters:
        document - the aimed document.
        input - the data to write.
        Throws:
        IOException - when it is not possible to write physically the data.
      • loadContentInto

        void loadContentInto​(SimpleDocument document,
                             OutputStream output)
                      throws IOException
        Loads a document content from the WEBDAV repository and writes it into given output.

        If several webdav document exists (several content languages), then the one which has the highest modified date is taken into account.

        Parameters:
        document - the aimed document.
        output - the stream to write into.
        Throws:
        IOException - when it is not possible to write physically the data.