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.util.HashMap;
027import java.util.Map;
028
029/**
030 * Descriptor for a PublicationTree configuration.
031 *
032 * @author tiry
033 */
034@XObject("publicationTreeConfig")
035public class PublicationTreeConfigDescriptor {
036
037    @XNode("@name")
038    private String name;
039
040    @XNode("@tree")
041    private String tree;
042
043    @XNode("@title")
044    private String title;
045
046    @XNode("@validatorsRule")
047    private String validatorsRule;
048
049    @XNode("@factory")
050    private String factory;
051
052    @XNodeMap(value = "parameters/parameter", key = "@name", type = HashMap.class, componentType = String.class)
053    Map<String, String> parameters = new HashMap<>();
054
055    public PublicationTreeConfigDescriptor() {
056    }
057
058    public PublicationTreeConfigDescriptor(PublicationTreeConfigDescriptor other) {
059        name = other.name;
060        tree = other.tree;
061        title = other.title;
062        validatorsRule = other.validatorsRule;
063        factory = other.factory;
064        parameters = new HashMap<>(other.parameters);
065    }
066
067    public String getName() {
068        return name;
069    }
070
071    public void setName(String name) {
072        this.name = name;
073    }
074
075    public String getTree() {
076        return tree;
077    }
078
079    public void setTree(String tree) {
080        this.tree = tree;
081    }
082
083    public String getValidatorsRule() {
084        return validatorsRule;
085    }
086
087    public String getFactory() {
088        return factory;
089    }
090
091    public void setFactory(String factory) {
092        this.factory = factory;
093    }
094
095    public Map<String, String> getParameters() {
096        return parameters;
097    }
098
099    public void setParameters(Map<String, String> parameters) {
100        this.parameters = parameters;
101    }
102
103    public String getTitle() {
104        return title;
105    }
106
107}