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 <[email protected]> 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 * @see DocumentBackedFileItem#versionIfNeeded(DocumentModel doc, CoreSession session) 043 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 044 * drive level, this method is not used anymore 045 */ 046 @Deprecated 047 boolean needsVersioning(DocumentModel doc); 048 049 /** 050 * Gets the delay passed which a document needs to be versioned since its last modification. 051 * 052 * @see DefaultFileSystemItemFactory#needsVersioning(DocumentModel) 053 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 054 * drive level, this method is not used anymore 055 */ 056 @Deprecated 057 double getVersioningDelay(); 058 059 /** 060 * Sets the delay passed which a document needs to be versioned since its last modification. 061 * 062 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 063 * drive level, this method is not used anymore 064 */ 065 @Deprecated 066 void setVersioningDelay(double versioningDelay); 067 068 /** 069 * Gets the increment option used when versioning a document. 070 * 071 * @see DocumentBackedFileItem#versionIfNeeded(DocumentModel doc, CoreSession session) 072 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 073 * drive level, this method is not used anymore 074 */ 075 @Deprecated 076 VersioningOption getVersioningOption(); 077 078 /** 079 * Sets the increment option used when versioning a document. 080 * 081 * @deprecated since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at 082 * drive level, this method is not used anymore 083 */ 084 @Deprecated 085 void setVersioningOption(VersioningOption versioningOption); 086 087}