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 *     Antoine Taillefer
016 */
017package org.nuxeo.ecm.diff.service.impl;
018
019import org.nuxeo.common.xmap.annotation.XNode;
020import org.nuxeo.common.xmap.annotation.XObject;
021import org.nuxeo.ecm.diff.model.DiffFieldItemDefinition;
022import org.nuxeo.ecm.diff.model.impl.DiffFieldItemDefinitionImpl;
023
024/**
025 * Diff field item descriptor.
026 *
027 * @author Antoine Taillefer (ataillefer@nuxeo.com)
028 * @since 5.6
029 */
030@XObject("item")
031public class DiffFieldItemDescriptor {
032
033    @XNode("@name")
034    public String name;
035
036    @XNode("@displayContentDiffLinks")
037    public boolean displayContentDiffLinks;
038
039    public String getName() {
040        return name;
041    }
042
043    public void setName(String name) {
044        this.name = name;
045    }
046
047    public boolean isDisplayContentDiffLinks() {
048        return displayContentDiffLinks;
049    }
050
051    public void setDisplayContentDiffLinks(boolean displayContentDiffLinks) {
052        this.displayContentDiffLinks = displayContentDiffLinks;
053    }
054
055    public DiffFieldItemDefinition getDiffFieldItemDefinition() {
056        return new DiffFieldItemDefinitionImpl(getName(), isDisplayContentDiffLinks());
057    }
058}