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 *     Thierry Delprat
016 * *
017 */
018
019package org.nuxeo.ecm.platform.computedgroups;
020
021import java.io.Serializable;
022import java.util.ArrayList;
023import java.util.List;
024
025import org.nuxeo.common.xmap.annotation.XNode;
026import org.nuxeo.common.xmap.annotation.XNodeList;
027import org.nuxeo.common.xmap.annotation.XObject;
028
029/**
030 * @author Thierry Delprat
031 */
032
033@XObject("groupComputerChain")
034public class GroupComputerChainDescriptor implements Serializable {
035
036    private static final long serialVersionUID = 1L;
037
038    @XNodeList(value = "computers/computer", type = ArrayList.class, componentType = String.class)
039    private List<String> computerNames;
040
041    @XNode("@append")
042    private boolean append = false;
043
044    public boolean isAppend() {
045        return append;
046    }
047
048    public List<String> getComputerNames() {
049        if (computerNames != null) {
050            return computerNames;
051        } else {
052            return new ArrayList<String>();
053        }
054    }
055
056}