001/*
002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     ataillefer
016 */
017package org.nuxeo.ecm.diff.model;
018
019import java.io.Serializable;
020import java.util.List;
021import java.util.Map;
022
023/**
024 * Diff block definition interface.
025 *
026 * @author <a href="mailto:ataillefer@nuxeo.com">Antoine Taillefer</a>
027 * @since 5.6
028 */
029public interface DiffBlockDefinition extends Serializable {
030
031    /**
032     * Gets the diff block definition name.
033     */
034    String getName();
035
036    /**
037     * Returns the template to use in a given mode.
038     */
039    String getTemplate(String mode);
040
041    /**
042     * Returns a map of templates by mode.
043     */
044    Map<String, String> getTemplates();
045
046    /**
047     * Returns the list of field definitions.
048     */
049    List<DiffFieldDefinition> getFields();
050
051    /**
052     * Returns a map of properties to use in a given mode.
053     */
054    Map<String, Serializable> getProperties(String layoutMode);
055
056    /**
057     * Returns a map of properties by mode.
058     */
059    Map<String, Map<String, Serializable>> getProperties();
060}