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 *     Florent Guillaume
011 */
012
013package org.nuxeo.ecm.core.versioning;
014
015import org.apache.commons.logging.Log;
016import org.apache.commons.logging.LogFactory;
017import org.nuxeo.ecm.core.api.CoreSession;
018import org.nuxeo.ecm.core.model.Document;
019import org.nuxeo.ecm.core.model.Session;
020
021/**
022 * Version removal policy that does nothing.
023 *
024 * @author Florent Guillaume
025 */
026public class NullVersionRemovalPolicy implements VersionRemovalPolicy {
027
028    private static final Log log = LogFactory.getLog(NullVersionRemovalPolicy.class);
029
030    @Override
031    public void removeVersions(Session session, Document doc, CoreSession coreSession) {
032        log.debug("Removing no versions");
033        // do nothing
034    }
035
036}