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 *     ataillefer
018 */
019package org.nuxeo.ecm.diff.model;
020
021import java.io.Serializable;
022import java.util.List;
023import java.util.Map;
024
025/**
026 * Diff block definition interface.
027 *
028 * @author <a href="mailto:ataillefer@nuxeo.com">Antoine Taillefer</a>
029 * @since 5.6
030 */
031public interface DiffBlockDefinition extends Serializable {
032
033    /**
034     * Gets the diff block definition name.
035     */
036    String getName();
037
038    /**
039     * Returns the template to use in a given mode.
040     */
041    String getTemplate(String mode);
042
043    /**
044     * Returns a map of templates by mode.
045     */
046    Map<String, String> getTemplates();
047
048    /**
049     * Returns the list of field definitions.
050     */
051    List<DiffFieldDefinition> getFields();
052
053    /**
054     * Returns a map of properties to use in a given mode.
055     */
056    Map<String, Serializable> getProperties(String layoutMode);
057
058    /**
059     * Returns a map of properties by mode.
060     */
061    Map<String, Map<String, Serializable>> getProperties();
062}