Package io.jmix.webdav.service.impl
Class WebdavDocumentsManagementServiceImpl
java.lang.Object
io.jmix.webdav.service.impl.WebdavDocumentsManagementServiceImpl
- All Implemented Interfaces:
WebdavDocumentsManagementService
@Component("webdav_WebdavDocumentsManagementService")
public class WebdavDocumentsManagementServiceImpl
extends Object
implements WebdavDocumentsManagementService
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected WebdavDocumentVersionsManagementService
protected javax.persistence.EntityManager
protected FetchPlanRepository
protected Metadata
static final String
static final String
static final String
static final String
protected TimeSource
protected org.springframework.transaction.support.TransactionTemplate
protected WebdavResourceUriTools
protected WebdavNaturalVersionIdGenerator
protected WebdavPreconditions
protected WebdavProperties
protected WebdavSecurityTools
protected WebdavTools
-
Constructor Summary
ConstructorDescriptionWebdavDocumentsManagementServiceImpl
(FetchPlanRepository fetchPlanRepository, WebdavPreconditions webdavPreconditions, WebdavResourceUriTools uriTools, Metadata metadata, DataManager dataManager, WebdavProperties webdavProperties, WebdavSecurityTools webdavSecurityTools, WebdavTools webdavTools, TimeSource timeSource, WebdavDocumentVersionsManagementService documentVersionsManagementService, WebdavNaturalVersionIdGenerator webdavNaturalVersionIdGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
acceptOnlyLastVersionIfVersioningDisabled
(WebdavDocument document, MergePolicy<?> mergePolicy, WebdavDocumentVersion lastVersion, List<MergeResultItem<WebdavDocumentVersion>> merged, List<WebdavDocumentVersion> documentVersions) protected Stream<WebdavDocumentVersion>
applyMergeOperation
(MergeResultItem<WebdavDocumentVersion> resultItem) protected WebdavDocument
copySingleWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri) copyWebdavDocument
(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite, Depth depth) createDocumentCollection
(String name, @Nullable 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, @Nullable WebdavDocument parent) Creates a non-versioning document.createVersioningDocumentByFileRef
(FileRef fileRef) Creates a versioning document.createVersioningDocumentByFileRef
(FileRef fileRef, @Nullable WebdavDocument parent) Creates a versioning document.protected WebdavLockDescriptor
internalCreateLock
(WebdavDocument webdavDocument, long timeout) protected WebdavLockDescriptor
internalRefreshLock
(WebdavDocument document, long timeout) protected boolean
isNonVersioningPolicy
(MergePolicy<?> mergePolicy) 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.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.protected void
removeDocumentCollection
(WebdavDocument webdavDocument) Removes a document collections along with all its members.protected MergePolicy<WebdavDocumentVersion>
resolveEffectiveVersionsMergePolicy
(WebdavDocument documentFromUser, WebdavDocument documentFromDb, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy) 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.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentId
(UUID documentId) Returns a document by a document id.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentId
(UUID documentId, FetchPlan fetchPlan) Returns a document by a document id.@Nullable WebdavDocument
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.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentUri
(URI documentPath) Returns a document by a document URI.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentUri
(URI documentPath, FetchPlan fetchPlan) Returns a document by a document URI.@Nullable WebdavDocument
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.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Returns a document by a document version.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan) Returns document by document version.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion, String fetchPlanName) Returns document by document version.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentVersionId
(UUID documentVersionId) Returns a document by a document version id.@Nullable WebdavDocument
retrieveDocumentByWebdavDocumentVersionId
(UUID documentVersionId, FetchPlan fetchPlan) Returns a document by a document version id.@Nullable WebdavDocument
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.protected void
setTransactionManager
(org.springframework.transaction.PlatformTransactionManager transactionManager) @Nullable WebdavDocument
unlockDocumentByWebdavDocument
(WebdavDocument document) Removes a lock for document.@Nullable WebdavDocument
unlockDocumentByWebdavDocumentId
(UUID documentId) Removes a lock for document.@Nullable WebdavDocument
unlockDocumentByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Removes a lock for document.@Nullable WebdavDocument
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.webdav.service.WebdavDocumentsManagementService
copyWebdavDocument, moveWebdavDocument
-
Field Details
-
RETRIEVE_WEBDAV_DOCUMENT_BY_WEBDAV_DOCUMENT_VERSION_ID
- See Also:
-
RETRIEVE_WEBDAV_DOCUMENT_BY_PATH_LIKE
- See Also:
-
RETRIEVE_WEBDAV_DOCUMENTS_STARTING_WITH_PATH
- See Also:
-
RETRIEVE_ROOT_WEBDAV_DOCUMENTS
- See Also:
-
fetchPlanRepository
-
webdavPreconditions
-
uriTools
-
metadata
-
dataManager
-
webdavProperties
-
webdavSecurityTools
-
webdavTools
-
timeSource
-
entityManager
protected javax.persistence.EntityManager entityManager -
transaction
protected org.springframework.transaction.support.TransactionTemplate transaction -
documentVersionsManagementService
-
webdavNaturalVersionIdGenerator
-
-
Constructor Details
-
WebdavDocumentsManagementServiceImpl
public WebdavDocumentsManagementServiceImpl(FetchPlanRepository fetchPlanRepository, WebdavPreconditions webdavPreconditions, WebdavResourceUriTools uriTools, Metadata metadata, DataManager dataManager, WebdavProperties webdavProperties, WebdavSecurityTools webdavSecurityTools, WebdavTools webdavTools, TimeSource timeSource, WebdavDocumentVersionsManagementService documentVersionsManagementService, WebdavNaturalVersionIdGenerator webdavNaturalVersionIdGenerator)
-
-
Method Details
-
setTransactionManager
@Autowired protected void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) -
retrieveDocumentByWebdavDocumentVersionId
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version id.- Specified by:
retrieveDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentVersionId
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version id.- Specified by:
retrieveDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentVersionId
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersionId(UUID documentVersionId, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version id.- Specified by:
retrieveDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentIdNN
in interfaceWebdavDocumentsManagementService
-
retrieveDocumentByWebdavDocumentId
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentId(UUID documentId, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentIdNN
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan
-
retrieveDocumentByWebdavDocumentId
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentId(UUID documentId, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentIdNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document id.- Specified by:
retrieveDocumentByWebdavDocumentIdNN
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan
-
retrieveDocumentByWebdavDocumentUri
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUri
in interfaceWebdavDocumentsManagementService
- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentUriNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUriNN
in interfaceWebdavDocumentsManagementService
-
retrieveDocumentByWebdavDocumentUri
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentUri(URI documentPath, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUri
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentUriNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUriNN
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan
-
retrieveDocumentByWebdavDocumentUri
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentUri(URI documentPath, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUri
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentUriNN
Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document URI.- Specified by:
retrieveDocumentByWebdavDocumentUriNN
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan
-
retrieveDocumentByWebdavDocumentVersion
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version.- Specified by:
retrieveDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentVersionNN
public WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version.- Specified by:
retrieveDocumentByWebdavDocumentVersionNN
in interfaceWebdavDocumentsManagementService
-
retrieveDocumentByWebdavDocumentVersion
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Returns document by document version.- Specified by:
retrieveDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentVersionNN
public WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version.- Specified by:
retrieveDocumentByWebdavDocumentVersionNN
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan
-
retrieveDocumentByWebdavDocumentVersion
@Nullable public @Nullable WebdavDocument retrieveDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns document by document version.- Specified by:
retrieveDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan- Returns:
- null if a document is not found
-
retrieveDocumentByWebdavDocumentVersionNN
public WebdavDocument retrieveDocumentByWebdavDocumentVersionNN(WebdavDocumentVersion documentVersion, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a document by a document version.- Specified by:
retrieveDocumentByWebdavDocumentVersionNN
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan
-
retrieveRootDocuments
Description copied from interface:WebdavDocumentsManagementService
Returns a list of documents that virtually belong to the top-level collection.- Specified by:
retrieveRootDocuments
in interfaceWebdavDocumentsManagementService
-
retrieveAllChildDocumentsByParentDocument
public List<WebdavDocument> retrieveAllChildDocumentsByParentDocument(WebdavDocument webdavDocument, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a list containing all descendants of the given document.- Specified by:
retrieveAllChildDocumentsByParentDocument
in interfaceWebdavDocumentsManagementService
-
retrieveAllChildDocumentsByParentDocumentURI
public List<WebdavDocument> retrieveAllChildDocumentsByParentDocumentURI(URI parentUri, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Returns a list containing all descendants of the document defined by the given resource path.- Specified by:
retrieveAllChildDocumentsByParentDocumentURI
in interfaceWebdavDocumentsManagementService
-
lockDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocument
Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with default timeout. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocument
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocumentVersionId
Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
lockDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocumentVersionId
@Transactional public WebdavDocument lockDocumentByWebdavDocumentVersionId(UUID documentVersionId, long timeout) Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
lockDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocumentVersion
@Transactional public WebdavDocument lockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with default timeout. The document is found by a version. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocumentVersion
@Transactional public WebdavDocument lockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, long timeout) Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with specific timeout. The document is found by a version. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
lockDocumentByWebdavDocument
@Transactional public WebdavDocument lockDocumentByWebdavDocument(WebdavDocument document, long timeout) Description copied from interface:WebdavDocumentsManagementService
Creates a lock for document with specific timeout. Automatically creates a transaction when the method is called.- Specified by:
lockDocumentByWebdavDocument
in interfaceWebdavDocumentsManagementService
- Returns:
- a locked document
-
internalRefreshLock
protected WebdavLockDescriptor internalRefreshLock(@Mutable(fieldName="webdavLockDescriptor") WebdavDocument document, long timeout) -
internalCreateLock
-
unlockDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
Removes a lock for document.- Specified by:
unlockDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocument
Description copied from interface:WebdavDocumentsManagementService
Removes a lock for document.- Specified by:
unlockDocumentByWebdavDocument
in interfaceWebdavDocumentsManagementService
- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocumentVersionId
@Nullable public @Nullable WebdavDocument unlockDocumentByWebdavDocumentVersionId(UUID documentVersionId) Description copied from interface:WebdavDocumentsManagementService
Removes a lock for document. The document is found by document version id.- Specified by:
unlockDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
- Returns:
- a unlocked document or null if a document is not locked
-
unlockDocumentByWebdavDocumentVersion
@Nullable public @Nullable WebdavDocument unlockDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavDocumentsManagementService
Removes a lock for document. The document is found by document version.- Specified by:
unlockDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
- Returns:
- a unlocked document or null if a document is not locked
-
updateDocumentByConcreteVersions
@Transactional public WebdavDocument updateDocumentByConcreteVersions(WebdavDocument document, List<WebdavDocumentVersion> documentVersions, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy) Description copied from interface:WebdavDocumentsManagementService
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
.- Specified by:
updateDocumentByConcreteVersions
in interfaceWebdavDocumentsManagementService
-
resolveEffectiveVersionsMergePolicy
protected MergePolicy<WebdavDocumentVersion> resolveEffectiveVersionsMergePolicy(WebdavDocument documentFromUser, WebdavDocument documentFromDb, MergePolicy<WebdavDocumentVersion> exceptionMergePolicy) -
applyMergeOperation
protected Stream<WebdavDocumentVersion> applyMergeOperation(MergeResultItem<WebdavDocumentVersion> resultItem) -
acceptOnlyLastVersionIfVersioningDisabled
protected void acceptOnlyLastVersionIfVersioningDisabled(WebdavDocument document, MergePolicy<?> mergePolicy, WebdavDocumentVersion lastVersion, List<MergeResultItem<WebdavDocumentVersion>> merged, List<WebdavDocumentVersion> documentVersions) -
isNonVersioningPolicy
-
updateDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
updateDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
-
updateDocumentByWebdavDocument
Description copied from interface:WebdavDocumentsManagementService
Adds a new document version to a document. The new version is based on a file reference.- Specified by:
updateDocumentByWebdavDocument
in interfaceWebdavDocumentsManagementService
- Returns:
- a updated document with a new last version
-
updateDocumentByWebdavDocumentVersion
public WebdavDocument updateDocumentByWebdavDocumentVersion(WebdavDocumentVersion documentVersion, FileRef fileRef) Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
updateDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
- Returns:
- a updated document with a new last version
-
updateDocumentByWebdavDocumentVersionId
public WebdavDocument updateDocumentByWebdavDocumentVersionId(UUID documentVersionId, FileRef fileRef) Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
updateDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
- Returns:
- a updated document with a new last version
-
createVersioningDocumentByFileRef
Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
createVersioningDocumentByFileRef
in interfaceWebdavDocumentsManagementService
-
createVersioningDocumentByFileRef
public WebdavDocument createVersioningDocumentByFileRef(FileRef fileRef, @Nullable @Nullable WebdavDocument parent) Description copied from interface:WebdavDocumentsManagementService
Creates a versioning document. The document will contain a version based on file reference.- Specified by:
createVersioningDocumentByFileRef
in interfaceWebdavDocumentsManagementService
-
createNonVersioningDocumentByFileRef
Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
createNonVersioningDocumentByFileRef
in interfaceWebdavDocumentsManagementService
-
createNonVersioningDocumentByFileRef
public WebdavDocument createNonVersioningDocumentByFileRef(FileRef fileRef, @Nullable @Nullable WebdavDocument parent) Description copied from interface:WebdavDocumentsManagementService
Creates a non-versioning document. The document will contain a version based on file reference.- Specified by:
createNonVersioningDocumentByFileRef
in interfaceWebdavDocumentsManagementService
-
createDocumentCollection
public WebdavDocument createDocumentCollection(String name, @Nullable @Nullable WebdavDocument parentCollection) Description copied from interface:WebdavDocumentsManagementService
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.- Specified by:
createDocumentCollection
in interfaceWebdavDocumentsManagementService
-
createDocumentCollectionByUri
Description copied from interface:WebdavDocumentsManagementService
Creates a document collection by the given URI.- Specified by:
createDocumentCollectionByUri
in interfaceWebdavDocumentsManagementService
-
updateDocumentVersioning
Description copied from interface:WebdavDocumentsManagementService
Enables or disables a document versioning.- Specified by:
updateDocumentVersioning
in interfaceWebdavDocumentsManagementService
-
updateDocumentVersioning
public WebdavDocument updateDocumentVersioning(WebdavDocument document, boolean versioning, String fetchPlanName) Description copied from interface:WebdavDocumentsManagementService
Enables or disables a document versioning.- Specified by:
updateDocumentVersioning
in interfaceWebdavDocumentsManagementService
fetchPlanName
- a returned document fetch plan
-
updateDocumentVersioning
public WebdavDocument updateDocumentVersioning(WebdavDocument document, boolean versioning, FetchPlan fetchPlan) Description copied from interface:WebdavDocumentsManagementService
Enables or disables a document versioning.- Specified by:
updateDocumentVersioning
in interfaceWebdavDocumentsManagementService
fetchPlan
- a returned document fetch plan
-
removeDocumentByWebdavDocumentId
Description copied from interface:WebdavDocumentsManagementService
Removes a document. If the document is collection, it will be deleted with all child members.- Specified by:
removeDocumentByWebdavDocumentId
in interfaceWebdavDocumentsManagementService
-
removeDocumentByWebdavDocumentUri
Description copied from interface:WebdavDocumentsManagementService
Removes a document. If the document is collection, it will be deleted with all child members.- Specified by:
removeDocumentByWebdavDocumentUri
in interfaceWebdavDocumentsManagementService
-
removeDocumentByWebdavDocument
Description copied from interface:WebdavDocumentsManagementService
Removes a document. If the document is collection, it will be deleted with all child members.- Specified by:
removeDocumentByWebdavDocument
in interfaceWebdavDocumentsManagementService
-
removeDocumentByWebdavDocumentVersionId
Description copied from interface:WebdavDocumentsManagementService
Removes a document. The document is found by document version id.- Specified by:
removeDocumentByWebdavDocumentVersionId
in interfaceWebdavDocumentsManagementService
-
removeDocumentByWebdavDocumentVersion
Description copied from interface:WebdavDocumentsManagementService
Removes a document. The document is found by document version.- Specified by:
removeDocumentByWebdavDocumentVersion
in interfaceWebdavDocumentsManagementService
-
removeDocumentCollection
Removes a document collections along with all its members. This method implicitly locks all documents before delete. -
copyWebdavDocument
public WebdavDocument copyWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite, Depth depth) - Specified by:
copyWebdavDocument
in interfaceWebdavDocumentsManagementService
-
copySingleWebdavDocument
protected WebdavDocument copySingleWebdavDocument(WebdavDocument sourceDocument, URI destinationUri) -
moveWebdavDocument
public WebdavDocument moveWebdavDocument(WebdavDocument sourceDocument, URI destinationUri, boolean overwrite) - Specified by:
moveWebdavDocument
in interfaceWebdavDocumentsManagementService
-