Package io.jmix.webdav.service.impl
Class WebdavRawLinksManagementServiceImpl
java.lang.Object
io.jmix.webdav.service.impl.WebdavRawLinksManagementServiceImpl
- All Implemented Interfaces:
WebdavRawLinksManagementService
@Component("webdav_WebdavLinksManagementService")
public class WebdavRawLinksManagementServiceImpl
extends Object
implements WebdavRawLinksManagementService
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected static com.google.gson.Gson
protected Metadata
protected static final String
protected WebdavProperties
-
Constructor Summary
ConstructorDescriptionWebdavRawLinksManagementServiceImpl
(DataManager dataManager, Metadata metadata, WebdavProperties webdavProperties) -
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.protected WebdavLink
createLink
(MetaClass entityClass, UUID entityId, WebdavLinkContext context) 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.protected MetaClass
protected MetaClass
protected WebdavUrl
getUrl
(MetaClass entityClass, UUID entityId, WebdavLinkContext linkContext) protected WebdavUrl
getUrlForLink
(WebdavLink link) 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.protected void
removeLink
(MetaClass entityClass, UUID entityId, WebdavLinkContext linkContext) 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.protected WebdavLink
retrieveLink
(MetaClass entityClass, UUID entityId, WebdavLinkContext context) 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.
-
Field Details
-
SELECT_WEBDAV_LINK_QUERY
- See Also:
-
gson
protected static com.google.gson.Gson gson -
dataManager
-
metadata
-
webdavProperties
-
-
Constructor Details
-
WebdavRawLinksManagementServiceImpl
public WebdavRawLinksManagementServiceImpl(DataManager dataManager, Metadata metadata, WebdavProperties webdavProperties)
-
-
Method Details
-
createDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with default context (full access mode) to a document.- Specified by:
createDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with default context (full access mode) to a document.- Specified by:
createDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createReadOnlyDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with read-only context to a document.- Specified by:
createReadOnlyDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createReadOnlyDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with read-only context to a document.- Specified by:
createReadOnlyDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with specific context to a document.- Specified by:
createDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with specific context to a document.- Specified by:
createDocumentLink
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version
-
createDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with default context (read-only access mode) to a document version.- Specified by:
createDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
createDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with default context (read-only access mode) to a document version.- Specified by:
createDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
createDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Creates a link with specific context to a document.- Specified by:
createDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
createDocumentVersionLink
public WebdavLink createDocumentVersionLink(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Creates a link with specific context to a document version.- Specified by:
createDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
retrieveDocumentLinkByDocumentId
Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context to a document.- Specified by:
retrieveDocumentLinkByDocumentId
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocument
Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context to document.- Specified by:
retrieveDocumentLinkByDocument
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentLinkByDocumentId
Description copied from interface:WebdavRawLinksManagementService
Returns a link with read-only context to a document.- Specified by:
retrieveReadOnlyDocumentLinkByDocumentId
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentLinkByDocument
Description copied from interface:WebdavRawLinksManagementService
Returns a link with read-only context to document.- Specified by:
retrieveReadOnlyDocumentLinkByDocument
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocumentIdAndContext
@Nullable public WebdavLink retrieveDocumentLinkByDocumentIdAndContext(UUID documentId, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with specific context to a document.- Specified by:
retrieveDocumentLinkByDocumentIdAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentLinkByDocumentAndContext
@Nullable public WebdavLink retrieveDocumentLinkByDocumentAndContext(WebdavDocument document, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with specific context to a document.- Specified by:
retrieveDocumentLinkByDocumentAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- a link to the last document version or null if a link is not found
-
retrieveDocumentVersionLinkByVersionId
Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context to a document version.- Specified by:
retrieveDocumentVersionLinkByVersionId
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersion
@Nullable public WebdavLink retrieveDocumentVersionLinkByVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context to a document version.- Specified by:
retrieveDocumentVersionLinkByVersion
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersionIdAndContext
@Nullable public WebdavLink retrieveDocumentVersionLinkByVersionIdAndContext(UUID documentVersionId, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with specific context to a document version.- Specified by:
retrieveDocumentVersionLinkByVersionIdAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionLinkByVersionAndContext
@Nullable public WebdavLink retrieveDocumentVersionLinkByVersionAndContext(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with specific context to a document version.- Specified by:
retrieveDocumentVersionLinkByVersionAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentUrlByDocumentId
Description copied from interface:WebdavRawLinksManagementService
Returns url with default context (full access mode) to a document.- Specified by:
retrieveDocumentUrlByDocumentId
in interfaceWebdavRawLinksManagementService
- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentUrlByDocument
Description copied from interface:WebdavRawLinksManagementService
Returns url with default context (full access mode) to document.- Specified by:
retrieveDocumentUrlByDocument
in interfaceWebdavRawLinksManagementService
- Returns:
- url to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentUrlByDocumentId
Description copied from interface:WebdavRawLinksManagementService
Returns url with read-only context to document.- Specified by:
retrieveReadOnlyDocumentUrlByDocumentId
in interfaceWebdavRawLinksManagementService
- Returns:
- url to the last document version or null if a link is not found
-
retrieveReadOnlyDocumentUrlByDocument
Description copied from interface:WebdavRawLinksManagementService
Returns url with read-only context to document.- Specified by:
retrieveReadOnlyDocumentUrlByDocument
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentUrlByDocumentIdAndContext
@Nullable public WebdavUrl retrieveDocumentUrlByDocumentIdAndContext(UUID documentId, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns url with specific context to a document.- Specified by:
retrieveDocumentUrlByDocumentIdAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentUrlByDocumentAndContext
@Nullable public WebdavUrl retrieveDocumentUrlByDocumentAndContext(WebdavDocument document, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns url with specific context to a document.- Specified by:
retrieveDocumentUrlByDocumentAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- url to the last document version or null if a link is not found
-
retrieveDocumentVersionUrlByVersionId
Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context (read-only access mode) to a document version.- Specified by:
retrieveDocumentVersionUrlByVersionId
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersion
@Nullable public WebdavUrl retrieveDocumentVersionUrlByVersion(WebdavDocumentVersion documentVersion) Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context (read-only access mode) to a document version.- Specified by:
retrieveDocumentVersionUrlByVersion
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersionIdAndContext
@Nullable public WebdavUrl retrieveDocumentVersionUrlByVersionIdAndContext(UUID documentVersionId, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context (read-only access mode) to a document version.- Specified by:
retrieveDocumentVersionUrlByVersionIdAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
retrieveDocumentVersionUrlByVersionAndContext
@Nullable public WebdavUrl retrieveDocumentVersionUrlByVersionAndContext(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Returns a link with default context (read-only access mode) to a document version.- Specified by:
retrieveDocumentVersionUrlByVersionAndContext
in interfaceWebdavRawLinksManagementService
- Returns:
- null if a link is not found
-
removeDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with default context.- Specified by:
removeDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with default context.- Specified by:
removeDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeReadOnlyDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with read-only context.- Specified by:
removeReadOnlyDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeReadOnlyDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with read-only context.- Specified by:
removeReadOnlyDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with specific context.- Specified by:
removeDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with specific context.- Specified by:
removeDocumentLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with default context to a document version.- Specified by:
removeDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with default context to a document version.- Specified by:
removeDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentVersionLink
Description copied from interface:WebdavRawLinksManagementService
Removes a link with specific context to a document version.- Specified by:
removeDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
removeDocumentVersionLink
public void removeDocumentVersionLink(WebdavDocumentVersion documentVersion, WebdavLinkContext linkContext) Description copied from interface:WebdavRawLinksManagementService
Removes link with specific context to a document version.- Specified by:
removeDocumentVersionLink
in interfaceWebdavRawLinksManagementService
-
removeLink
-
getUrl
@Nullable protected WebdavUrl getUrl(MetaClass entityClass, UUID entityId, WebdavLinkContext linkContext) -
retrieveLink
@Nullable protected WebdavLink retrieveLink(MetaClass entityClass, UUID entityId, WebdavLinkContext context) -
createLink
-
getUrlForLink
-
getDocumentMetaClass
-
getDocumentVersionMetaClass
-