Package io.jmix.webdav.service.impl
Class WebdavUrlManagementServiceImpl
java.lang.Object
io.jmix.webdav.service.impl.WebdavUrlManagementServiceImpl
- All Implemented Interfaces:
WebdavUrlManagementService
@Component("webdav_WebdavUrlManagementService")
public class WebdavUrlManagementServiceImpl
extends Object
implements WebdavUrlManagementService
-
Field Summary
Modifier and TypeFieldDescriptionprotected WebdavDocumentsManagementService
protected WebdavDocumentVersionsManagementService
protected FetchPlanRepository
protected WebdavProperties
protected WebdavSecurityTools
protected WebdavTools
-
Constructor Summary
ConstructorDescriptionWebdavUrlManagementServiceImpl
(WebdavProperties webdavProperties, WebdavTools webdavTools, WebdavSecurityTools webdavSecurityTools, WebdavDocumentsManagementService documentsManagementService, WebdavDocumentVersionsManagementService documentVersionsManagementService, FetchPlanRepository fetchPlanRepository) -
Method Summary
Modifier and TypeMethodDescriptionresolveEffectiveApplication
(WebdavDocumentVersion version, ApplicationProtocolType protocolType) Returns an application for document version with specificApplicationProtocolType
.retrieveConcreteVersionUrlByWebdavDocumentAndNaturalVersion
(WebdavDocument document, Long naturalVersionId) Returns a link to the concrete document version with read-only access mode.retrieveConcreteVersionUrlByWebdavDocumentIdAndNaturalVersion
(UUID documentId, Long naturalVersionId) Returns a link to the concrete document version with read-only access mode.retrieveConcreteVersionUrlByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Returns a link to the concrete document version with read-only access mode.retrieveConcreteVersionUrlByWebdavDocumentVersionId
(UUID documentVersionId) Returns a link to the concrete document version with read-only access mode.protected WebdavUrl
retrieveDocumentUrlByLatestWebdavDocumentVersion
(WebdavDocument webdavDocument) Returns a link to the last document version with full access mode.retrieveDocumentUrlByWebdavDocumentId
(UUID documentId) Returns a link to the last document version with full access mode.retrieveDocumentUrlByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Returns a link to the last document version with full access mode.retrieveDocumentUrlByWebdavDocumentVersionId
(UUID documentVersionId) Returns a link to the last document version with full access mode.Returns a link to the last document version with read-only access mode.retrieveLastVersionUrlByWebdavDocumentId
(UUID documentId) Returns a link to the last document version with read-only access mode.retrieveLastVersionUrlByWebdavDocumentVersion
(WebdavDocumentVersion documentVersion) Returns a link to the last document version with read-only access mode.retrieveLastVersionUrlByWebdavDocumentVersionId
(UUID documentVersionId) Returns a link to the last document version with read-only access mode.
-
Field Details
-
webdavProperties
-
webdavTools
-
webdavSecurityTools
-
documentsManagementService
-
documentVersionsManagementService
-
fetchPlanRepository
-
-
Constructor Details
-
WebdavUrlManagementServiceImpl
public WebdavUrlManagementServiceImpl(WebdavProperties webdavProperties, WebdavTools webdavTools, WebdavSecurityTools webdavSecurityTools, WebdavDocumentsManagementService documentsManagementService, WebdavDocumentVersionsManagementService documentVersionsManagementService, FetchPlanRepository fetchPlanRepository)
-
-
Method Details
-
retrieveDocumentUrlByWebdavDocumentId
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with full access mode.- Specified by:
retrieveDocumentUrlByWebdavDocumentId
in interfaceWebdavUrlManagementService
- Returns:
- Returns a link to last version of file with full access mode. Returns a read-only link if user don't have rights to update document. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document not found.
-
retrieveDocumentUrlByWebdavDocument
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with full access mode.- Specified by:
retrieveDocumentUrlByWebdavDocument
in interfaceWebdavUrlManagementService
- Returns:
- Returns a link to last version of file with full access mode. Returns a read-only link if user don't have rights to update document. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document not found.
-
retrieveDocumentUrlByWebdavDocumentVersionId
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with full access mode. It finds the related document and gets last version for it.- Specified by:
retrieveDocumentUrlByWebdavDocumentVersionId
in interfaceWebdavUrlManagementService
- Returns:
- Returns a link to last version of file with full access mode. Returns a read-only link if user don't have rights to update document. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document not found.
-
retrieveDocumentUrlByWebdavDocumentVersion
@Nullable public WebdavUrl retrieveDocumentUrlByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with full access mode. It finds related document and gets last version for it.- Specified by:
retrieveDocumentUrlByWebdavDocumentVersion
in interfaceWebdavUrlManagementService
- Returns:
- Returns a link to last version of file with full access mode. Returns a read-only link if user don't have rights to update document. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document not found.
-
retrieveDocumentUrlByLatestWebdavDocumentVersion
@Nullable protected WebdavUrl retrieveDocumentUrlByLatestWebdavDocumentVersion(WebdavDocument webdavDocument) -
retrieveConcreteVersionUrlByWebdavDocumentVersionId
@Nullable public WebdavUrl retrieveConcreteVersionUrlByWebdavDocumentVersionId(UUID documentVersionId) Description copied from interface:WebdavUrlManagementService
Returns a link to the concrete document version with read-only access mode.- Specified by:
retrieveConcreteVersionUrlByWebdavDocumentVersionId
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the concrete version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveConcreteVersionUrlByWebdavDocumentVersion
@Nullable public WebdavUrl retrieveConcreteVersionUrlByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavUrlManagementService
Returns a link to the concrete document version with read-only access mode.- Specified by:
retrieveConcreteVersionUrlByWebdavDocumentVersion
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the concrete version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveConcreteVersionUrlByWebdavDocumentIdAndNaturalVersion
@Nullable public WebdavUrl retrieveConcreteVersionUrlByWebdavDocumentIdAndNaturalVersion(UUID documentId, Long naturalVersionId) Description copied from interface:WebdavUrlManagementService
Returns a link to the concrete document version with read-only access mode.- Specified by:
retrieveConcreteVersionUrlByWebdavDocumentIdAndNaturalVersion
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the concrete version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveConcreteVersionUrlByWebdavDocumentAndNaturalVersion
@Nullable public WebdavUrl retrieveConcreteVersionUrlByWebdavDocumentAndNaturalVersion(WebdavDocument document, Long naturalVersionId) Description copied from interface:WebdavUrlManagementService
Returns a link to the concrete document version with read-only access mode.- Specified by:
retrieveConcreteVersionUrlByWebdavDocumentAndNaturalVersion
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the concrete version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveLastVersionUrlByWebdavDocumentId
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with read-only access mode.- Specified by:
retrieveLastVersionUrlByWebdavDocumentId
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the last version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveLastVersionUrlByWebdavDocument
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with read-only access mode.- Specified by:
retrieveLastVersionUrlByWebdavDocument
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the last version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveLastVersionUrlByWebdavDocumentVersionId
Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with read-only access mode.- Specified by:
retrieveLastVersionUrlByWebdavDocumentVersionId
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the last version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
retrieveLastVersionUrlByWebdavDocumentVersion
@Nullable public WebdavUrl retrieveLastVersionUrlByWebdavDocumentVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavUrlManagementService
Returns a link to the last document version with read-only access mode.- Specified by:
retrieveLastVersionUrlByWebdavDocumentVersion
in interfaceWebdavUrlManagementService
- Returns:
- Returns a read-only link to the last version of file. Returns a link for downloading of file if there is no applications for this type of file. Returns null if document version not found.
-
resolveEffectiveApplication
public Application resolveEffectiveApplication(WebdavDocumentVersion version, ApplicationProtocolType protocolType) Description copied from interface:WebdavUrlManagementService
Returns an application for document version with specificApplicationProtocolType
.- Specified by:
resolveEffectiveApplication
in interfaceWebdavUrlManagementService
- Returns:
- Application information
-