001/* 002 * (C) Copyright 2006-2009 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 * Nuxeo 016 */ 017 018package org.nuxeo.ecm.platform.publisher.descriptors; 019 020import org.nuxeo.common.xmap.annotation.XNode; 021import org.nuxeo.common.xmap.annotation.XNodeMap; 022import org.nuxeo.common.xmap.annotation.XObject; 023 024import java.io.Serializable; 025import java.util.HashMap; 026import java.util.Map; 027 028/** 029 * Descriptor for a PublicationTree configuration. 030 * 031 * @author tiry 032 */ 033@XObject("publicationTreeConfig") 034public class PublicationTreeConfigDescriptor implements Serializable { 035 036 private static final long serialVersionUID = 1L; 037 038 @XNode("@name") 039 private String name; 040 041 @XNode("@tree") 042 private String tree; 043 044 @XNode("@title") 045 private String title; 046 047 @XNode("@validatorsRule") 048 private String validatorsRule; 049 050 @XNode("@factory") 051 private String factory; 052 053 @XNode("@localSectionTree") 054 private boolean localSectionTree = false; 055 056 @XNodeMap(value = "parameters/parameter", key = "@name", type = HashMap.class, componentType = String.class) 057 Map<String, String> parameters = new HashMap<String, String>(); 058 059 public PublicationTreeConfigDescriptor() { 060 } 061 062 public PublicationTreeConfigDescriptor(PublicationTreeConfigDescriptor other) { 063 name = other.name; 064 tree = other.tree; 065 title = other.title; 066 validatorsRule = other.validatorsRule; 067 factory = other.factory; 068 localSectionTree = other.localSectionTree; 069 parameters = new HashMap<String, String>(other.parameters); 070 } 071 072 public String getName() { 073 return name; 074 } 075 076 public void setName(String name) { 077 this.name = name; 078 } 079 080 public String getTree() { 081 return tree; 082 } 083 084 public void setTree(String tree) { 085 this.tree = tree; 086 } 087 088 public String getValidatorsRule() { 089 return validatorsRule; 090 } 091 092 public String getFactory() { 093 return factory; 094 } 095 096 public void setFactory(String factory) { 097 this.factory = factory; 098 } 099 100 public boolean islocalSectionTree() { 101 return localSectionTree; 102 } 103 104 public Map<String, String> getParameters() { 105 return parameters; 106 } 107 108 public void setParameters(Map<String, String> parameters) { 109 this.parameters = parameters; 110 } 111 112 public String getTitle() { 113 return title; 114 } 115 116}