001/*
002 * (C) Copyright 2006-2010 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 *     bstefanescu
016 */
017package org.nuxeo.runtime.jetty;
018
019import java.util.HashMap;
020import java.util.Map;
021
022import org.nuxeo.common.xmap.annotation.XNode;
023import org.nuxeo.common.xmap.annotation.XNodeMap;
024import org.nuxeo.common.xmap.annotation.XObject;
025
026/**
027 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a>
028 */
029@XObject("filter")
030public class FilterDescriptor {
031
032    // the filter name if any
033    @XNode("@name")
034    protected String name;
035
036    @XNode("@class")
037    protected Class<?> clazz;
038
039    @XNode("@context")
040    protected String context;
041
042    @XNode("@path")
043    protected String path;
044
045    @XNodeMap(value = "init-params/param", key = "@name", type = HashMap.class, componentType = String.class, trim = true, nullByDefault = true)
046    protected Map<String, String> initParams;
047
048    // the description if any
049    @XNode("description")
050    protected String description;
051
052    public FilterDescriptor() {
053    }
054
055    public Class<?> getClazz() {
056        return clazz;
057    }
058
059    public String getName() {
060        return name;
061    }
062
063    public void setName(String name) {
064        this.name = name;
065    }
066
067    public String getDescription() {
068        return description;
069    }
070
071    public void setDescription(String description) {
072        this.description = description;
073    }
074
075    public String getContext() {
076        return context;
077    }
078
079    public String getPath() {
080        return path;
081    }
082
083    public Map<String, String> getInitParams() {
084        return initParams;
085    }
086
087    public void setInitParams(Map<String, String> initParams) {
088        this.initParams = initParams;
089    }
090}