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