001/*
002 * (C) Copyright 2006-2007 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 *     Florent Guillaume
016 *
017 * $Id: FieldDescriptor.java 24597 2007-09-05 16:04:04Z fguillaume $
018 */
019
020package org.nuxeo.ecm.directory.multi;
021
022import org.nuxeo.common.xmap.annotation.XNode;
023import org.nuxeo.common.xmap.annotation.XObject;
024
025/**
026 * @author Florent Guillaume
027 */
028@XObject("field")
029public class FieldDescriptor {
030
031    @XNode("")
032    public String name;
033
034    @XNode("@for")
035    public String forField;
036
037    @Override
038    public String toString() {
039        return String.format("{field name=%s for=%s", name, forField);
040    }
041
042    /**
043     * @since 5.6
044     */
045    public FieldDescriptor clone() {
046        FieldDescriptor clone = new FieldDescriptor();
047        clone.name = name;
048        clone.forField = forField;
049        return clone;
050    }
051
052}