Features

The add-on provides the WebdavDocument entity that should be used in your data model to reference files exposed via WebDAV.

WebdavSupport Annotation

The @WebdavSupport annotation can be applied to fields of the WebdavDocument type. By using this annotation, you have the ability to disable versioning for a specific field, as versioning is enabled by default.

For instance, consider the following example:

@JmixEntity
@Entity
public class WebdavDocumentWrapper {

    @JoinColumn(name = "WEBDAV_DOCUMENT_ID")
    @OneToOne(fetch = FetchType.LAZY)
    private WebdavDocument webdavDocument;

    @JoinColumn(name = "DOC_WITHOUT_VERSION_ID")
    @WebdavSupport(versioning = false)
    @OneToOne(fetch = FetchType.LAZY)
    private WebdavDocument docWithoutVersion;

    // getters and setters
}

In this example, docWithoutVersion has versioning disabled, while webdavDocument will have versioning enabled by default.

The add-on generates links to documents, which can be posted on a website or shared with third parties. The link has the format: https://<host>:<port>/webdav/link/82b62377-7fd1-b75e-47fc-9ef4b8d67360. When accessing the link, the user’s browser will prompt for credentials to access the document. Upon successful authentication, the document will open in an appropriate desktop application if it is installed on the user’s computer.