001/*
002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Nuxeo - initial API and implementation
011 *
012 * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $
013 */
014
015package org.nuxeo.ecm.core.api.facet;
016
017/**
018 * Declares constants and methods used to control document versions mostly when a document is saved.
019 *
020 * @author <a href="mailto:dm@nuxeo.com">Dragos Mihalache</a>
021 */
022public interface VersioningDocument {
023
024    /**
025     * @deprecated use {@link VersioningService#VERSIONING_OPTION} instead
026     */
027    @Deprecated
028    String CREATE_SNAPSHOT_ON_SAVE_KEY = "CREATE_SNAPSHOT_ON_SAVE";
029
030    /**
031     * @deprecated use {@link VersioningService#VERSIONING_OPTION} instead
032     */
033    @Deprecated
034    String KEY_FOR_INC_OPTION = "VersioningOption";
035
036    /**
037     * Key used in options map to send current versions to versioning listener so it will know what version the document
038     * had before restoring.
039     */
040    String CURRENT_DOCUMENT_MINOR_VERSION_KEY = "CURRENT_DOCUMENT_MINOR_VERSION";
041
042    String CURRENT_DOCUMENT_MAJOR_VERSION_KEY = "CURRENT_DOCUMENT_MAJOR_VERSION";
043
044    /**
045     * Key used in options map to send the UUID of the version being restored to the listeners.
046     */
047    String RESTORED_VERSION_UUID_KEY = "RESTORED_VERSION_UUID";
048
049    /**
050     * @deprecated use {@link VersioningService#getVersionLabel} instead
051     */
052    @Deprecated
053    Long getMinorVersion();
054
055    /**
056     * @deprecated use {@link VersioningService#getVersionLabel} instead
057     */
058    @Deprecated
059    Long getMajorVersion();
060
061    /**
062     * Returns a string representation of the version number.
063     *
064     * @return a string, like {@code "2.1"}
065     */
066    String getVersionLabel();
067
068}