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