Package io.jmix.webdav.service
Interface WebdavDocumentsManagementService
- All Known Implementing Classes:
WebdavDocumentsManagementServiceImpl
public interface WebdavDocumentsManagementService
Service for working with WebdavDocument.
-
Method Summary
Modifier and TypeMethodDescriptiondefault WebdavDocument
copyWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri) copyWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite, Depth depth) createDocumentCollection
(String name, WebdavDocument parentCollection) Creates a document collection inside the given parent collection.createDocumentCollectionByUri
(URI documentPath) Creates a document collection by the given URI.Creates a non-versioning document.createNonVersioningDocumentByFileRef
(FileRef fileRef, WebdavDocument parent) Creates a non-versioning document.createVersioningDocumentByFileRef
(FileRef fileRef) Creates a versioning document.createVersioningDocumentByFileRef
(FileRef fileRef, WebdavDocument parent) Creates a versioning document.lockDocumentByWebdavDocument
(WebdavDocument document) Creates a lock for document with default timeout.lockDocumentByWebdavDocument
(WebdavDocument document, long timeout) Creates a lock for document with specific timeout.lockDocumentByWebdavDocumentId
(UUID documentId) Creates a lock for document with default timeout.lockDocumentByWebdavDocumentId
(UUID documentId, long timeout) Creates a lock for document with specific timeout.lockDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Creates a lock for document with default timeout.lockDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, long timeout) Creates a lock for document with specific timeout.lockDocumentByWebdavDocumentVersionId
(UUID documentVersionId) Creates a lock for document with default timeout.lockDocumentByWebdavDocumentVersionId
(UUID documentVersionId, long timeout) Creates a lock for document with specific timeout.default WebdavDocument
moveWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri) moveWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite) void
removeDocumentByWebdavDocument
(WebdavDocument webdavDocument) Removes a document.void
removeDocumentByWebdavDocumentId
(UUID documentId) Removes a document.void
removeDocumentByWebdavDocumentUri
(URI documentPath) Removes a document.void
removeDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Removes a document.void
removeDocumentByWebdavDocumentVersionId
(UUID documentVersionId) Removes a document.retrieveAllChildDocumentsByParentDocument
(WebdavDocument webdavDocument, FetchPlan fetchPlan) Returns a list containing all descendants of the given document.retrieveAllChildDocumentsByParentDocumentURI
(URI parentUri, FetchPlan fetchPlan) Returns a list containing all descendants of the document defined by the given resource path.retrieveAllChildDocumentsByParentPath
(String parentPath, FetchPlan fetchPlan) Returns a list containing all descendants of the document defined by the given parent string path.retrieveAllChildDocumentsByParentPath
(String parentPath, FetchPlan fetchPlan, boolean softDelete) Returns a list containing all descendants of the document defined by the given parent string path.retrieveDocumentByWebdavDocumentId
(UUID documentId) Returns a document by a document id.retrieveDocumentByWebdavDocumentId
(UUID documentId, FetchPlan fetchPlan) Returns a document by a document id.retrieveDocumentByWebdavDocumentId
(UUID documentId, String fetchPlanName) Returns a document by a document id.retrieveDocumentByWebdavDocumentIdNN
(UUID documentId) Returns a document by a document id.retrieveDocumentByWebdavDocumentIdNN
(UUID documentId, FetchPlan fetchPlan) Returns a document by a document id.retrieveDocumentByWebdavDocumentIdNN
(UUID documentId, String fetchPlanName) Returns a document by a document id.retrieveDocumentByWebdavDocumentUri
(URI documentPath) Returns a document by a document URI.retrieveDocumentByWebdavDocumentUri
(URI documentPath, FetchPlan fetchPlan) Returns a document by a document URI.retrieveDocumentByWebdavDocumentUri
(URI documentPath, String fetchPlanName) Returns a document by a document URI.retrieveDocumentByWebdavDocumentUriNN
(URI documentPath) Returns a document by a document URI.retrieveDocumentByWebdavDocumentUriNN
(URI documentPath, FetchPlan fetchPlan) Returns a document by a document URI.retrieveDocumentByWebdavDocumentUriNN
(URI documentPath, String fetchPlanName) Returns a document by a document URI.retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Returns a document by a document version.retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan) Returns document by document version.retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, String fetchPlanName) Returns document by document version.retrieveDocumentByWebdavDocumentVersionId
(UUID documentVersionId) Returns a document by a document version id.retrieveDocumentByWebdavDocumentVersionId
(UUID documentVersionId, FetchPlan fetchPlan) Returns a document by a document version id.retrieveDocumentByWebdavDocumentVersionId
(UUID documentVersionId, String fetchPlanName) Returns a document by a document version id.retrieveDocumentByWebdavDocumentVersionNN
(WebdavDocumentVersion documentVersion) Returns a document by a document version.retrieveDocumentByWebdavDocumentVersionNN
(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan) Returns a document by a document version.retrieveDocumentByWebdavDocumentVersionNN
(WebdavDocumentVersion documentVersion, String fetchPlanName) Returns a document by a document version.retrieveRootDocuments
(FetchPlan fetchPlan) Returns a list of documents that virtually belong to the top-level collection.unlockDocumentByWebdavDocument
(WebdavDocument document) Removes a lock for document.unlockDocumentByWebdavDocumentId
(UUID documentId) Removes a lock for document.unlockDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Removes a lock for document.unlockDocumentByWebdavDocumentVersionId
(UUID documentVersionId) Removes a lock for document.updateDocumentByConcreteVersions
(WebdavDocument document, List<WebdavDocumentVersion> documentVersions, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy) Adds new versions fromdocumentVersions
to document and resolves conflicts.updateDocumentByWebdavDocument
(WebdavDocument document, FileRef fileRef) Adds a new document version to a document.updateDocumentByWebdavDocumentId
(UUID documentId, FileRef fileRef) Returns document with new added version.updateDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, FileRef fileRef) Adds a new document version to a document.updateDocumentByWebdavDocumentVersionId
(UUID documentVersionId, FileRef fileRef) Adds a new document version to a document.updateDocumentVersioning
(WebdavDocument document, boolean versioning) Enables or disables a document versioning.updateDocumentVersioning
(WebdavDocument document, boolean versioning, FetchPlan fetchPlan) Enables or disables a document versioning.updateDocumentVersioning
(WebdavDocument document, boolean versioning, String fetchPlanName) Enables or disables a document versioning.
-
Method Details
-
retrieveDocumentByWebdavDocumentVersionId
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
Returns a document by a document id.- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Returns a document by a document id.- Throws:
WebdavDocumentNotFoundException
- if a document is not found
-
retrieveDocumentByWebdavDocumentId
Returns a document by a document id.- Parameters:
fetchPlanName
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Returns a document by a document id.- Parameters:
fetchPlanName
- a returned document fetch plan- Throws:
WebdavDocumentNotFoundException
- if a document is not found
-
retrieveDocumentByWebdavDocumentId
Returns a document by a document id.- Parameters:
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Returns a document by a document id.- Parameters:
fetchPlan
- a returned document fetch plan- Throws:
WebdavDocumentNotFoundException
- if a document is not found
-
retrieveDocumentByWebdavDocumentUri
Returns a document by a document URI.- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentUriNN
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
Returns a document by a document URI.- Parameters:
fetchPlanName
- a returned document fetch plan- Throws:
WebdavDocumentNotFoundException
- if a document is not found
-
retrieveDocumentByWebdavDocumentUri
Returns a document by a document URI.- Parameters:
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentUriNN
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
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
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
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 directoryfetchPlan
- 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 directoryfetchPlan
- fetch plan for loadingsoftDelete
- enable\disable soft-delete condition- Returns:
- list of found documents.
-
lockDocumentByWebdavDocumentId
Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.- Returns:
- a locked document
-
lockDocumentByWebdavDocumentId
Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.- Returns:
- a locked document
-
lockDocumentByWebdavDocument
Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.- Returns:
- a locked document
-
lockDocumentByWebdavDocument
Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.- Returns:
- a locked document
-
lockDocumentByWebdavDocumentVersionId
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
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
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
Removes a lock for document.- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocument
Removes a lock for document.- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocumentVersionId
Removes a lock for document. The document is found by document version id.- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocumentVersion
@Nullable WebdavDocument unlockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Removes a lock for document. The document is found by document version.- Returns:
- a unlocked document or null if a document is not locked
-
updateDocumentByConcreteVersions
WebdavDocument updateDocumentByConcreteVersions(@Mutable WebdavDocument document, @Mutable List<WebdavDocumentVersion> documentVersions, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy) Adds new versions fromdocumentVersions
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 fromexceptionMergePolicy
. -
updateDocumentByWebdavDocumentId
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
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
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
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
Creates a versioning document. The document will contain a version based on file reference. -
createNonVersioningDocumentByFileRef
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
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
Creates a document collection by the given URI.- Throws:
WebdavParentDocumentCollectionNotFoundException
- if one or more intermediate collections have not been createdWebdavResourceURIMappedException
- if document with the same URI already exist
-
updateDocumentVersioning
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
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/unlockingWebdavResourceNotLockedException
- if user doesn't have lock for document
-
removeDocumentByWebdavDocumentUri
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/unlockingWebdavResourceNotLockedException
- if user doesn't have lock for document
-
removeDocumentByWebdavDocument
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/unlockingWebdavResourceNotLockedException
- if user doesn't have lock for document
-
removeDocumentByWebdavDocumentVersionId
Removes a document. The document is found by document version id.- Throws:
WebdavSecurityException
- if user doesn't have permissions for document removing/unlockingWebdavResourceNotLockedException
- if user doesn't have lock for document
-
removeDocumentByWebdavDocumentVersion
Removes a document. The document is found by document version.- Throws:
WebdavSecurityException
- if user doesn't have permissions for document removing/unlockingWebdavResourceNotLockedException
- if user doesn't have lock for document
-
copyWebdavDocument
-
copyWebdavDocument
WebdavDocument copyWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite, Depth depth) -
moveWebdavDocument
-
moveWebdavDocument
WebdavDocument moveWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite)
-