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 *     Laurent Doguin
011 */
012package org.nuxeo.ecm.core.versioning;
013
014import java.util.Map;
015
016/**
017 * Class implementing this interface will be able to use contribution from the versioningRules extension point.
018 * 
019 * @author Laurent Doguin
020 * @since 5.4.2
021 */
022public interface ExtendableVersioningService extends VersioningService {
023
024    /**
025     * @return A Map containing the versioning rule for specific types.
026     */
027    Map<String, VersioningRuleDescriptor> getVersioningRules();
028
029    /**
030     * Add versioning rules for specific types.
031     * 
032     * @param versioningRules
033     */
034    void setVersioningRules(Map<String, VersioningRuleDescriptor> versioningRules);
035
036    /**
037     * Set the default versioning rule for all document type.
038     * 
039     * @param defaultVersioningRule
040     */
041    void setDefaultVersioningRule(DefaultVersioningRuleDescriptor defaultVersioningRule);
042
043}