Interface WebdavDocumentsManagementService

All Known Implementing Classes:
WebdavDocumentsManagementServiceImpl

public interface WebdavDocumentsManagementService
Service for working with WebdavDocument.
  • Method Details

    • retrieveDocumentByWebdavDocumentVersionId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId)
      Returns a document by a document version id.
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentVersionId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId, String fetchPlanName)
      Returns a document by a document version id.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentVersionId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId, FetchPlan fetchPlan)
      Returns a document by a document version id.
      Parameters:
      fetchPlan - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentId(UUID documentId)
      Returns a document by a document id.
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentIdNN

      WebdavDocument retrieveDocumentByWebdavDocumentIdNN(UUID documentId)
      Returns a document by a document id.
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentId(UUID documentId, String fetchPlanName)
      Returns a document by a document id.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentIdNN

      WebdavDocument retrieveDocumentByWebdavDocumentIdNN(UUID documentId, String fetchPlanName)
      Returns a document by a document id.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentId

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentId(UUID documentId, FetchPlan fetchPlan)
      Returns a document by a document id.
      Parameters:
      fetchPlan - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentIdNN

      WebdavDocument retrieveDocumentByWebdavDocumentIdNN(UUID documentId, FetchPlan fetchPlan)
      Returns a document by a document id.
      Parameters:
      fetchPlan - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentUri

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentUri(URI documentPath)
      Returns a document by a document URI.
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentUriNN

      WebdavDocument retrieveDocumentByWebdavDocumentUriNN(URI documentPath)
      Returns a document by a document URI.
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentUri

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentUri(URI documentPath, String fetchPlanName)
      Returns a document by a document URI.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentUriNN

      WebdavDocument retrieveDocumentByWebdavDocumentUriNN(URI documentPath, String fetchPlanName)
      Returns a document by a document URI.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentUri

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentUri(URI documentPath, FetchPlan fetchPlan)
      Returns a document by a document URI.
      Parameters:
      fetchPlan - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentUriNN

      WebdavDocument retrieveDocumentByWebdavDocumentUriNN(URI documentPath, FetchPlan fetchPlan)
      Returns a document by a document URI.
      Parameters:
      fetchPlan - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentVersion

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion)
      Returns a document by a document version.
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentVersionNN

      WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion)
      Returns a document by a document version.
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentVersion

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, String fetchPlanName)
      Returns document by document version.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentVersionNN

      WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion, String fetchPlanName)
      Returns a document by a document version.
      Parameters:
      fetchPlanName - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveDocumentByWebdavDocumentVersion

      @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan)
      Returns document by document version.
      Parameters:
      fetchPlan - a returned document fetch plan
      Returns:
      null if a document is not found
    • retrieveDocumentByWebdavDocumentVersionNN

      WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan)
      Returns a document by a document version.
      Parameters:
      fetchPlan - a returned document fetch plan
      Throws:
      WebdavDocumentNotFoundException - if a document is not found
    • retrieveRootDocuments

      List<WebdavDocument> retrieveRootDocuments(FetchPlan fetchPlan)
      Returns a list of documents that virtually belong to the top-level collection.
    • retrieveAllChildDocumentsByParentDocument

      List<WebdavDocument> retrieveAllChildDocumentsByParentDocument(WebdavDocument webdavDocument, FetchPlan fetchPlan)
      Returns a list containing all descendants of the given document.
    • retrieveAllChildDocumentsByParentDocumentURI

      List<WebdavDocument> retrieveAllChildDocumentsByParentDocumentURI(URI parentUri, FetchPlan fetchPlan)
      Returns a list containing all descendants of the document defined by the given resource path.
      Throws:
      WebdavDocumentNotFoundException - if a document is not found by the given URI
    • retrieveAllChildDocumentsByParentPath

      List<WebdavDocument> retrieveAllChildDocumentsByParentPath(String parentPath, FetchPlan fetchPlan)
      Returns a list containing all descendants of the document defined by the given parent string path. Soft-deleted documents are excluded.
      Parameters:
      parentPath - full path of the parent directory
      fetchPlan - fetch plan for loading
      Returns:
      list of found documents.
    • retrieveAllChildDocumentsByParentPath

      List<WebdavDocument> retrieveAllChildDocumentsByParentPath(String parentPath, FetchPlan fetchPlan, boolean softDelete)
      Returns a list containing all descendants of the document defined by the given parent string path.
      Parameters:
      parentPath - full path of the parent directory
      fetchPlan - fetch plan for loading
      softDelete - enable\disable soft-delete condition
      Returns:
      list of found documents.
    • lockDocumentByWebdavDocumentId

      WebdavDocument lockDocumentByWebdavDocumentId(UUID documentId)
      Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocumentId

      WebdavDocument lockDocumentByWebdavDocumentId(UUID documentId, long timeout)
      Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocument

      WebdavDocument lockDocumentByWebdavDocument(WebdavDocument document)
      Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocument

      WebdavDocument lockDocumentByWebdavDocument(WebdavDocument document, long timeout)
      Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocumentVersionId

      WebdavDocument lockDocumentByWebdavDocumentVersionId(UUID documentVersionId)
      Creates a lock for document with default timeout. The document is found by a version id. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocumentVersionId

      WebdavDocument lockDocumentByWebdavDocumentVersionId(UUID documentVersionId, long timeout)
      Creates a lock for document with specific timeout. The document is found by a version id. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocumentVersion

      WebdavDocument lockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion)
      Creates a lock for document with default timeout. The document is found by a version. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • lockDocumentByWebdavDocumentVersion

      WebdavDocument lockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, long timeout)
      Creates a lock for document with specific timeout. The document is found by a version. Automatically creates a transaction when the method is called.
      Returns:
      a locked document
    • unlockDocumentByWebdavDocumentId

      WebdavDocument unlockDocumentByWebdavDocumentId(UUID documentId)
      Removes a lock for document.
      Returns:
      a unlocked document
    • unlockDocumentByWebdavDocument

      WebdavDocument unlockDocumentByWebdavDocument(WebdavDocument document)
      Removes a lock for document.
      Returns:
      a unlocked document
    • unlockDocumentByWebdavDocumentVersionId

      WebdavDocument unlockDocumentByWebdavDocumentVersionId(UUID documentVersionId)
      Removes a lock for document. The document is found by document version id.
      Returns:
      a unlocked document
    • unlockDocumentByWebdavDocumentVersion

      WebdavDocument unlockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion)
      Removes a lock for document. The document is found by document version.
      Returns:
      a unlocked document
    • updateDocumentByConcreteVersions

      WebdavDocument updateDocumentByConcreteVersions(@Mutable WebdavDocument document, @Mutable List<WebdavDocumentVersion> documentVersions, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy)
      Adds new versions from documentVersions to document and resolves conflicts. Conflicts occur if last version of changed document is differs from last version of document in database. For conflict solving is used policy from exceptionMergePolicy.
    • updateDocumentByWebdavDocumentId

      WebdavDocument updateDocumentByWebdavDocumentId(UUID documentId, FileRef fileRef)
      Returns document with new added version. New version is created by FileDescriptor instance and is set as last version. Document for update is set by id.
    • updateDocumentByWebdavDocument

      WebdavDocument updateDocumentByWebdavDocument(@Mutable WebdavDocument document, FileRef fileRef)
      Adds a new document version to a document. The new version is based on a file reference.
      Returns:
      a updated document with a new last version
    • updateDocumentByWebdavDocumentVersionId

      WebdavDocument updateDocumentByWebdavDocumentVersionId(UUID documentVersionId, FileRef fileRef)
      Adds a new document version to a document. The new version is based on a file descriptor. The document is found by a document version id.
      Returns:
      a updated document with a new last version
    • updateDocumentByWebdavDocumentVersion

      WebdavDocument updateDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, FileRef fileRef)
      Adds a new document version to a document. The new version is based on a file reference. The document is found by a document version.
      Returns:
      a updated document with a new last version
    • createVersioningDocumentByFileRef

      WebdavDocument createVersioningDocumentByFileRef(FileRef fileRef)
      Creates a versioning document. The document will contain a version based on file reference. The document will not have a parent document specified, which means that it will be shown in the root collection.
    • createVersioningDocumentByFileRef

      WebdavDocument createVersioningDocumentByFileRef(FileRef fileRef, @Nullable WebdavDocument parent)
      Creates a versioning document. The document will contain a version based on file reference.
    • createNonVersioningDocumentByFileRef

      WebdavDocument createNonVersioningDocumentByFileRef(FileRef fileRef)
      Creates a non-versioning document. The document will contain a version based on file reference. The document will not have a parent document specified, which means that it will be shown in the root collection.
    • createNonVersioningDocumentByFileRef

      WebdavDocument createNonVersioningDocumentByFileRef(FileRef fileRef, @Nullable WebdavDocument parent)
      Creates a non-versioning document. The document will contain a version based on file reference.
    • createDocumentCollection

      WebdavDocument createDocumentCollection(String name, @Nullable WebdavDocument parentCollection)
      Creates a document collection inside the given parent collection. If the parent collection is null, the resulting collection will be created within the root collection.
      Throws:
      WebdavResourceURIMappedException - if document with the same URI already exist
    • createDocumentCollectionByUri

      WebdavDocument createDocumentCollectionByUri(URI documentPath)
      Creates a document collection by the given URI.
      Throws:
      WebdavParentDocumentCollectionNotFoundException - if one or more intermediate collections have not been created
      WebdavResourceURIMappedException - if document with the same URI already exist
    • updateDocumentVersioning

      WebdavDocument updateDocumentVersioning(WebdavDocument document, boolean versioning)
      Enables or disables a document versioning.
    • updateDocumentVersioning

      WebdavDocument updateDocumentVersioning(WebdavDocument document, boolean versioning, String fetchPlanName)
      Enables or disables a document versioning.
      Parameters:
      fetchPlanName - a returned document fetch plan
    • updateDocumentVersioning

      WebdavDocument updateDocumentVersioning(WebdavDocument document, boolean versioning, FetchPlan fetchPlan)
      Enables or disables a document versioning.
      Parameters:
      fetchPlan - a returned document fetch plan
    • removeDocumentByWebdavDocumentId

      void removeDocumentByWebdavDocumentId(UUID documentId)
      Removes a document. If the document is collection, it will be deleted with all child members.
      Throws:
      WebdavSecurityException - if user doesn't have permissions for document removing/unlocking
      WebdavResourceNotLockedException - if user doesn't have lock for document
    • removeDocumentByWebdavDocumentUri

      void removeDocumentByWebdavDocumentUri(URI documentPath)
      Removes a document. If the document is collection, it will be deleted with all child members.
      Throws:
      WebdavSecurityException - if user doesn't have permissions for document removing/unlocking
      WebdavResourceNotLockedException - if user doesn't have lock for document
    • removeDocumentByWebdavDocument

      void removeDocumentByWebdavDocument(WebdavDocument webdavDocument)
      Removes a document. If the document is collection, it will be deleted with all child members.
      Throws:
      WebdavSecurityException - if user doesn't have permissions for document removing/unlocking
      WebdavResourceNotLockedException - if user doesn't have lock for document
    • removeDocumentByWebdavDocumentVersionId

      void removeDocumentByWebdavDocumentVersionId(UUID documentVersionId)
      Removes a document. The document is found by document version id.
      Throws:
      WebdavSecurityException - if user doesn't have permissions for document removing/unlocking
      WebdavResourceNotLockedException - if user doesn't have lock for document
    • removeDocumentByWebdavDocumentVersion

      void removeDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion)
      Removes a document. The document is found by document version.
      Throws:
      WebdavSecurityException - if user doesn't have permissions for document removing/unlocking
      WebdavResourceNotLockedException - if user doesn't have lock for document
    • copyWebdavDocument

      default WebdavDocument copyWebdavDocument(WebdavDocument sourceDocument, URI destinationUri)
    • copyWebdavDocument

      WebdavDocument copyWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite, Depth depth)
    • moveWebdavDocument

      default WebdavDocument moveWebdavDocument(WebdavDocument sourceDocument, URI destinationUri)
    • moveWebdavDocument

      WebdavDocument moveWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite)