001/* 002 * (C) Copyright 2006-2009 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo 018 */ 019 020package org.nuxeo.ecm.platform.publisher.descriptors; 021 022import org.nuxeo.common.xmap.annotation.XNode; 023import org.nuxeo.common.xmap.annotation.XNodeMap; 024import org.nuxeo.common.xmap.annotation.XObject; 025 026import java.io.Serializable; 027import java.util.HashMap; 028import java.util.Map; 029 030/** 031 * Descriptor for a PublicationTree configuration. 032 * 033 * @author tiry 034 */ 035@XObject("publicationTreeConfig") 036public class PublicationTreeConfigDescriptor implements Serializable { 037 038 private static final long serialVersionUID = 1L; 039 040 @XNode("@name") 041 private String name; 042 043 @XNode("@tree") 044 private String tree; 045 046 @XNode("@title") 047 private String title; 048 049 @XNode("@validatorsRule") 050 private String validatorsRule; 051 052 @XNode("@factory") 053 private String factory; 054 055 @XNodeMap(value = "parameters/parameter", key = "@name", type = HashMap.class, componentType = String.class) 056 Map<String, String> parameters = new HashMap<String, String>(); 057 058 public PublicationTreeConfigDescriptor() { 059 } 060 061 public PublicationTreeConfigDescriptor(PublicationTreeConfigDescriptor other) { 062 name = other.name; 063 tree = other.tree; 064 title = other.title; 065 validatorsRule = other.validatorsRule; 066 factory = other.factory; 067 parameters = new HashMap<String, String>(other.parameters); 068 } 069 070 public String getName() { 071 return name; 072 } 073 074 public void setName(String name) { 075 this.name = name; 076 } 077 078 public String getTree() { 079 return tree; 080 } 081 082 public void setTree(String tree) { 083 this.tree = tree; 084 } 085 086 public String getValidatorsRule() { 087 return validatorsRule; 088 } 089 090 public String getFactory() { 091 return factory; 092 } 093 094 public void setFactory(String factory) { 095 this.factory = factory; 096 } 097 098 public Map<String, String> getParameters() { 099 return parameters; 100 } 101 102 public void setParameters(Map<String, String> parameters) { 103 this.parameters = parameters; 104 } 105 106 public String getTitle() { 107 return title; 108 } 109 110}