001/* 002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Antoine Taillefer <ataillefer@nuxeo.com> 018 */ 019package org.nuxeo.drive.service; 020 021import org.nuxeo.drive.adapter.impl.DocumentBackedFileItem; 022import org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory; 023import org.nuxeo.ecm.core.api.CoreSession; 024import org.nuxeo.ecm.core.api.DocumentModel; 025import org.nuxeo.ecm.core.api.VersioningOption; 026 027/** 028 * A {@link FileSystemItemFactory} able to handle versioning. 029 * 030 * @author Antoine Taillefer 031 * @see DefaultFileSystemItemFactory 032 * @deprecated since 9.1 as the automatic versioning is handled by versioning system, we don't need anymore this 033 * mechanism in drive 034 */ 035@Deprecated 036public interface VersioningFileSystemItemFactory extends FileSystemItemFactory { 037 038 /** 039 * Returns true if the given {@link DocumentModel} needs to be versioned. An example of policy could be to version 040 * the document if the last modification was done more than {@link #getVersioningDelay()} seconds ago. 041 * 042 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 043 * drive level, this method is not used anymore 044 */ 045 @Deprecated 046 boolean needsVersioning(DocumentModel doc); 047 048 /** 049 * Gets the delay passed which a document needs to be versioned since its last modification. 050 * 051 * @see DefaultFileSystemItemFactory#needsVersioning(DocumentModel) 052 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 053 * drive level, this method is not used anymore 054 */ 055 @Deprecated 056 double getVersioningDelay(); 057 058 /** 059 * Sets the delay passed which a document needs to be versioned since its last modification. 060 * 061 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 062 * drive level, this method is not used anymore 063 */ 064 @Deprecated 065 void setVersioningDelay(double versioningDelay); 066 067 /** 068 * Gets the increment option used when versioning a document. 069 * 070 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 071 * drive level, this method is not used anymore 072 */ 073 @Deprecated 074 VersioningOption getVersioningOption(); 075 076 /** 077 * Sets the increment option used when versioning a document. 078 * 079 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 080 * drive level, this method is not used anymore 081 */ 082 @Deprecated 083 void setVersioningOption(VersioningOption versioningOption); 084 085}