Search in sources :

Example 1 with VersioningFileSystemItemFactory

use of org.nuxeo.drive.service.VersioningFileSystemItemFactory in project nuxeo-drive-server by nuxeo.

the class NuxeoDriveSetVersioningOptions method run.

@OperationMethod
public void run() {
    NuxeoDriveIntegrationTestsHelper.checkOperationAllowed();
    FileSystemItemAdapterService fileSystemItemAdapterService = Framework.getService(FileSystemItemAdapterService.class);
    VersioningFileSystemItemFactory defaultFileSystemItemFactory = (VersioningFileSystemItemFactory) ((FileSystemItemAdapterServiceImpl) fileSystemItemAdapterService).getFileSystemItemFactory("defaultFileSystemItemFactory");
    if (delay != null) {
        defaultFileSystemItemFactory.setVersioningDelay(Double.parseDouble(delay));
    }
    if (option != null) {
        defaultFileSystemItemFactory.setVersioningOption(VersioningOption.valueOf(option));
    }
}
Also used : FileSystemItemAdapterService(org.nuxeo.drive.service.FileSystemItemAdapterService) VersioningFileSystemItemFactory(org.nuxeo.drive.service.VersioningFileSystemItemFactory) OperationMethod(org.nuxeo.ecm.automation.core.annotations.OperationMethod)

Aggregations

FileSystemItemAdapterService (org.nuxeo.drive.service.FileSystemItemAdapterService)1 VersioningFileSystemItemFactory (org.nuxeo.drive.service.VersioningFileSystemItemFactory)1 OperationMethod (org.nuxeo.ecm.automation.core.annotations.OperationMethod)1