001/*
002 * (C) Copyright 2006-2010 Nuxeo SAS (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 *     bstefanescu
016 */
017package org.nuxeo.connect.update.xml;
018
019import org.nuxeo.common.xmap.annotation.XNode;
020import org.nuxeo.common.xmap.annotation.XObject;
021import org.nuxeo.connect.update.model.Field;
022
023/**
024 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a>
025 */
026@XObject
027public class FieldDefinition implements Field {
028
029    @XNode("@name")
030    protected String name;
031
032    @XNode("@type")
033    protected String type;
034
035    @XNode("@required")
036    protected boolean isRequired;
037
038    @XNode("@vertical")
039    protected boolean isVertical;
040
041    @XNode("@readonly")
042    protected boolean isReadOnly;
043
044    @XNode("label")
045    protected String label;
046
047    @XNode("value")
048    protected String value;
049
050    @Override
051    public String getLabel() {
052        return label;
053    }
054
055    @Override
056    public String getName() {
057        return name;
058    }
059
060    @Override
061    public String getType() {
062        return type;
063    }
064
065    @Override
066    public boolean isRequired() {
067        return isRequired;
068    }
069
070    @Override
071    public boolean isVertical() {
072        return isVertical;
073    }
074
075    @Override
076    public boolean isReadOnly() {
077        return isReadOnly;
078    }
079
080    @Override
081    public String getValue() {
082        return value;
083    }
084
085}