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    @XNode("@localSectionTree")
056    private boolean localSectionTree = false;
057
058    @XNodeMap(value = "parameters/parameter", key = "@name", type = HashMap.class, componentType = String.class)
059    Map<String, String> parameters = new HashMap<String, String>();
060
061    public PublicationTreeConfigDescriptor() {
062    }
063
064    public PublicationTreeConfigDescriptor(PublicationTreeConfigDescriptor other) {
065        name = other.name;
066        tree = other.tree;
067        title = other.title;
068        validatorsRule = other.validatorsRule;
069        factory = other.factory;
070        localSectionTree = other.localSectionTree;
071        parameters = new HashMap<String, String>(other.parameters);
072    }
073
074    public String getName() {
075        return name;
076    }
077
078    public void setName(String name) {
079        this.name = name;
080    }
081
082    public String getTree() {
083        return tree;
084    }
085
086    public void setTree(String tree) {
087        this.tree = tree;
088    }
089
090    public String getValidatorsRule() {
091        return validatorsRule;
092    }
093
094    public String getFactory() {
095        return factory;
096    }
097
098    public void setFactory(String factory) {
099        this.factory = factory;
100    }
101
102    public boolean islocalSectionTree() {
103        return localSectionTree;
104    }
105
106    public Map<String, String> getParameters() {
107        return parameters;
108    }
109
110    public void setParameters(Map<String, String> parameters) {
111        this.parameters = parameters;
112    }
113
114    public String getTitle() {
115        return title;
116    }
117
118}