Package io.jmix.webdav.service
Interface WebdavRawLinksManagementService
- All Known Implementing Classes:
WebdavRawLinksManagementServiceImpl
public interface WebdavRawLinksManagementService
Service for work with persistent links.
Persistent links stores in database as WebdavLink entity instance and point to WebdavDocument or WebdavDocumentVersion entity instance.
The links have look: http://localhost:8080/app/webdav/link/{linkIdentifier} where linkIdentifier is WebdavLink entity instance id.
For example, http://localhost:8080/app/webdav/link/7a53ce0e-1576-ad32-a131-4abcde6b1235
After clicking on the link will be generated and open non-persistent link.
Each link has context. Context - it is additional information about how need to open entity file, to which the link points. By default, link is created with default (empty) context. It mean, that context depends on stored in link entity type. If link entity type is WebdavDocument the file will be opened with full access mode. If link entity type is WebdavDocumentVersion the file will be opened with read-only access mode.
String value of link is encapsulated by field WebdavUrl.url
of WebdavUrl
.
-
Method Summary
Modifier and TypeMethodDescriptioncreateDocumentLink
(WebdavDocument document) Creates a link with default context (full access mode) to a document.createDocumentLink
(WebdavDocument document, WebdavLinkContext linkContext) Creates a link with specific context to a document.createDocumentLink
(UUID documentId) Creates a link with default context (full access mode) to a document.createDocumentLink
(UUID documentId, WebdavLinkContext linkContext) Creates a link with specific context to a document.createDocumentVersionLink
(WebdavDocumentVersion documentVersion) Creates a link with default context (read-only access mode) to a document version.createDocumentVersionLink
(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Creates a link with specific context to a document version.createDocumentVersionLink
(UUID documentVersionId) Creates a link with default context (read-only access mode) to a document version.createDocumentVersionLink
(UUID documentVersionId, WebdavLinkContext linkContext) Creates a link with specific context to a document.createReadOnlyDocumentLink
(WebdavDocument document) Creates a link with read-only context to a document.createReadOnlyDocumentLink
(UUID documentId) Creates a link with read-only context to a document.void
removeDocumentLink
(WebdavDocument document) Removes a link with default context.void
removeDocumentLink
(WebdavDocument document, WebdavLinkContext linkContext) Removes a link with specific context.void
removeDocumentLink
(UUID documentId) Removes a link with default context.void
removeDocumentLink
(UUID documentId, WebdavLinkContext linkContext) Removes a link with specific context.void
removeDocumentVersionLink
(WebdavDocumentVersion documentVersion) Removes a link with default context to a document version.void
removeDocumentVersionLink
(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Removes link with specific context to a document version.void
removeDocumentVersionLink
(UUID documentVersionId) Removes a link with default context to a document version.void
removeDocumentVersionLink
(UUID documentVersionId, WebdavLinkContext linkContext) Removes a link with specific context to a document version.void
removeReadOnlyDocumentLink
(WebdavDocument document) Removes a link with read-only context.void
removeReadOnlyDocumentLink
(UUID documentId) Removes a link with read-only context.retrieveDocumentLinkByDocument
(WebdavDocument document) Returns a link with default context to document.retrieveDocumentLinkByDocumentAndContext
(WebdavDocument document, WebdavLinkContext linkContext) Returns a link with specific context to a document.retrieveDocumentLinkByDocumentId
(UUID documentId) Returns a link with default context to a document.retrieveDocumentLinkByDocumentIdAndContext
(UUID documentId, WebdavLinkContext linkContext) Returns a link with specific context to a document.retrieveDocumentUrlByDocument
(WebdavDocument document) Returns url with default context (full access mode) to document.retrieveDocumentUrlByDocumentAndContext
(WebdavDocument document, WebdavLinkContext linkContext) Returns url with specific context to a document.retrieveDocumentUrlByDocumentId
(UUID documentId) Returns url with default context (full access mode) to a document.retrieveDocumentUrlByDocumentIdAndContext
(UUID documentId, WebdavLinkContext linkContext) Returns url with specific context to a document.retrieveDocumentVersionLinkByVersion
(WebdavDocumentVersion documentVersion) Returns a link with default context to a document version.retrieveDocumentVersionLinkByVersionAndContext
(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Returns a link with specific context to a document version.retrieveDocumentVersionLinkByVersionId
(UUID documentVersionId) Returns a link with default context to a document version.retrieveDocumentVersionLinkByVersionIdAndContext
(UUID documentVersionId, WebdavLinkContext linkContext) Returns a link with specific context to a document version.retrieveDocumentVersionUrlByVersion
(WebdavDocumentVersion documentVersion) Returns a link with default context (read-only access mode) to a document version.retrieveDocumentVersionUrlByVersionAndContext
(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Returns a link with default context (read-only access mode) to a document version.retrieveDocumentVersionUrlByVersionId
(UUID documentVersionId) Returns a link with default context (read-only access mode) to a document version.retrieveDocumentVersionUrlByVersionIdAndContext
(UUID documentVersionId, WebdavLinkContext linkContext) Returns a link with default context (read-only access mode) to a document version.Returns a link with read-only context to document.retrieveReadOnlyDocumentLinkByDocumentId
(UUID documentId) Returns a link with read-only context to a document.Returns url with read-only context to document.retrieveReadOnlyDocumentUrlByDocumentId
(UUID documentId) Returns url with read-only context to document.
-
Method Details
-
createDocumentLink
Creates a link with default context (full access mode) to a document.- Returns:
- a link to the last document version
-
createDocumentLink
Creates a link with default context (full access mode) to a document.- Returns:
- a link to the last document version
-
createReadOnlyDocumentLink
Creates a link with read-only context to a document.- Returns:
- a link to the last document version
-
createReadOnlyDocumentLink
Creates a link with read-only context to a document.- Returns:
- a link to the last document version
-
createDocumentLink
Creates a link with specific context to a document.- Returns:
- a link to the last document version
-
createDocumentLink
Creates a link with specific context to a document.- Returns:
- a link to the last document version
-
createDocumentVersionLink
Creates a link with default context (read-only access mode) to a document version. -
createDocumentVersionLink
Creates a link with default context (read-only access mode) to a document version. -
createDocumentVersionLink
Creates a link with specific context to a document. -
createDocumentVersionLink
WebdavLink createDocumentVersionLink(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Creates a link with specific context to a document version. -
retrieveDocumentLinkByDocumentId
Returns a link with default context to a document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocument
Returns a link with default context to document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentLinkByDocumentId
Returns a link with read-only context to a document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentLinkByDocument
Returns a link with read-only context to document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocumentIdAndContext
@Nullable WebdavLink retrieveDocumentLinkByDocumentIdAndContext(UUID documentId, WebdavLinkContext linkContext) Returns a link with specific context to a document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocumentAndContext
@Nullable WebdavLink retrieveDocumentLinkByDocumentAndContext(WebdavDocument document, WebdavLinkContext linkContext) Returns a link with specific context to a document.- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentVersionLinkByVersionId
Returns a link with default context to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersion
Returns a link with default context to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersionIdAndContext
@Nullable WebdavLink retrieveDocumentVersionLinkByVersionIdAndContext(UUID documentVersionId, WebdavLinkContext linkContext) Returns a link with specific context to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersionAndContext
@Nullable WebdavLink retrieveDocumentVersionLinkByVersionAndContext(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Returns a link with specific context to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentUrlByDocumentId
Returns url with default context (full access mode) to a document.- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentUrlByDocument
Returns url with default context (full access mode) to document.- Returns:
- url to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentUrlByDocumentId
Returns url with read-only context to document.- Returns:
- url to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentUrlByDocument
Returns url with read-only context to document.- Returns:
- null if a link is not found
-
retrieveDocumentUrlByDocumentIdAndContext
@Nullable WebdavUrl retrieveDocumentUrlByDocumentIdAndContext(UUID documentId, WebdavLinkContext linkContext) Returns url with specific context to a document.- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentUrlByDocumentAndContext
@Nullable WebdavUrl retrieveDocumentUrlByDocumentAndContext(WebdavDocument document, WebdavLinkContext linkContext) Returns url with specific context to a document.- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentVersionUrlByVersionId
Returns a link with default context (read-only access mode) to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersion
Returns a link with default context (read-only access mode) to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersionIdAndContext
@Nullable WebdavUrl retrieveDocumentVersionUrlByVersionIdAndContext(UUID documentVersionId, WebdavLinkContext linkContext) Returns a link with default context (read-only access mode) to a document version.- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersionAndContext
@Nullable WebdavUrl retrieveDocumentVersionUrlByVersionAndContext(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Returns a link with default context (read-only access mode) to a document version.- Returns:
- null if a link is not found
-
removeDocumentLink
Removes a link with default context. -
removeDocumentLink
Removes a link with default context. -
removeReadOnlyDocumentLink
Removes a link with read-only context. -
removeReadOnlyDocumentLink
Removes a link with read-only context. -
removeDocumentLink
Removes a link with specific context. -
removeDocumentLink
Removes a link with specific context. -
removeDocumentVersionLink
Removes a link with default context to a document version. -
removeDocumentVersionLink
Removes a link with default context to a document version. -
removeDocumentVersionLink
Removes a link with specific context to a document version. -
removeDocumentVersionLink
void removeDocumentVersionLink(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Removes link with specific context to a document version.
-