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("servlet") 032public class ServletDescriptor { 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 ServletDescriptor() { 055 } 056 057 public Class<?> getClazz() { 058 return clazz; 059 } 060 061 public String getContext() { 062 return context; 063 } 064 065 public String getPath() { 066 return path; 067 } 068 069 public Map<String, String> getInitParams() { 070 return initParams; 071 } 072 073 public void setInitParams(Map<String, String> initParams) { 074 this.initParams = initParams; 075 } 076 077 public String getName() { 078 return name; 079 } 080 081 public void setName(String name) { 082 this.name = name; 083 } 084 085 public String getDescription() { 086 return description; 087 } 088 089 public void setDescription(String description) { 090 this.description = description; 091 } 092 093}