001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee.sun;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020: import javax.xml.bind.annotation.XmlAccessType;
021: import javax.xml.bind.annotation.XmlAccessorType;
022: import javax.xml.bind.annotation.XmlAttribute;
023: import javax.xml.bind.annotation.XmlElement;
024: import javax.xml.bind.annotation.XmlRootElement;
025: import javax.xml.bind.annotation.XmlType;
026: import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
027: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028:
029: @XmlAccessorType(XmlAccessType.FIELD)
030: @XmlType(name="",propOrder={"contextRoot","securityRoleMapping","servlet","idempotentUrlPattern","sessionConfig","ejbRef","resourceRef","resourceEnvRef","serviceRef","messageDestinationRef","cache","classLoader","jspConfig","localeCharsetInfo","parameterEncoding","property","messageDestination","webserviceDescription"})
031: @XmlRootElement(name="sun-web-app")
032: public class SunWebApp {
033: @XmlAttribute(name="error-url")
034: @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
035: protected String errorUrl;
036: @XmlAttribute(name="httpservlet-security-provider")
037: @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
038: protected String httpservletSecurityProvider;
039: @XmlElement(name="context-root")
040: protected String contextRoot;
041: @XmlElement(name="security-role-mapping")
042: protected List<SecurityRoleMapping> securityRoleMapping;
043: protected List<Servlet> servlet;
044: @XmlElement(name="idempotent-url-pattern")
045: protected List<IdempotentUrlPattern> idempotentUrlPattern;
046: @XmlElement(name="session-config")
047: protected SessionConfig sessionConfig;
048: @XmlElement(name="ejb-ref")
049: protected List<EjbRef> ejbRef;
050: @XmlElement(name="resource-ref")
051: protected List<ResourceRef> resourceRef;
052: @XmlElement(name="resource-env-ref")
053: protected List<ResourceEnvRef> resourceEnvRef;
054: @XmlElement(name="service-ref")
055: protected List<ServiceRef> serviceRef;
056: @XmlElement(name="message-destination-ref")
057: protected List<MessageDestinationRef> messageDestinationRef;
058: protected Cache cache;
059: @XmlElement(name="class-loader")
060: protected ClassLoader classLoader;
061: @XmlElement(name="jsp-config")
062: protected JspConfig jspConfig;
063: @XmlElement(name="locale-charset-info")
064: protected LocaleCharsetInfo localeCharsetInfo;
065: @XmlElement(name="parameter-encoding")
066: protected ParameterEncoding parameterEncoding;
067: protected List<Property> property;
068: @XmlElement(name="message-destination")
069: protected List<MessageDestination> messageDestination;
070: @XmlElement(name="webservice-description")
071: protected List<WebserviceDescription> webserviceDescription;
072:
073: public String getErrorUrl() {
074: if (errorUrl == null) {
075: return "";
076: } else {
077: return errorUrl;
078: }
079: }
080:
081: public void setErrorUrl(String value) {
082: this .errorUrl = value;
083: }
084:
085: public String getHttpservletSecurityProvider() {
086: return httpservletSecurityProvider;
087: }
088:
089: public void setHttpservletSecurityProvider(String value) {
090: this .httpservletSecurityProvider = value;
091: }
092:
093: public String getContextRoot() {
094: return contextRoot;
095: }
096:
097: public void setContextRoot(String value) {
098: this .contextRoot = value;
099: }
100:
101: public List<SecurityRoleMapping> getSecurityRoleMapping() {
102: if (securityRoleMapping == null) {
103: securityRoleMapping = new ArrayList<SecurityRoleMapping>();
104: }
105: return this .securityRoleMapping;
106: }
107:
108: public List<Servlet> getServlet() {
109: if (servlet == null) {
110: servlet = new ArrayList<Servlet>();
111: }
112: return this .servlet;
113: }
114:
115: public List<IdempotentUrlPattern> getIdempotentUrlPattern() {
116: if (idempotentUrlPattern == null) {
117: idempotentUrlPattern = new ArrayList<IdempotentUrlPattern>();
118: }
119: return this .idempotentUrlPattern;
120: }
121:
122: public SessionConfig getSessionConfig() {
123: return sessionConfig;
124: }
125:
126: public void setSessionConfig(SessionConfig value) {
127: this .sessionConfig = value;
128: }
129:
130: public List<EjbRef> getEjbRef() {
131: if (ejbRef == null) {
132: ejbRef = new ArrayList<EjbRef>();
133: }
134: return this .ejbRef;
135: }
136:
137: public List<ResourceRef> getResourceRef() {
138: if (resourceRef == null) {
139: resourceRef = new ArrayList<ResourceRef>();
140: }
141: return this .resourceRef;
142: }
143:
144: public List<ResourceEnvRef> getResourceEnvRef() {
145: if (resourceEnvRef == null) {
146: resourceEnvRef = new ArrayList<ResourceEnvRef>();
147: }
148: return this .resourceEnvRef;
149: }
150:
151: public List<ServiceRef> getServiceRef() {
152: if (serviceRef == null) {
153: serviceRef = new ArrayList<ServiceRef>();
154: }
155: return this .serviceRef;
156: }
157:
158: public List<MessageDestinationRef> getMessageDestinationRef() {
159: if (messageDestinationRef == null) {
160: messageDestinationRef = new ArrayList<MessageDestinationRef>();
161: }
162: return this .messageDestinationRef;
163: }
164:
165: public Cache getCache() {
166: return cache;
167: }
168:
169: public void setCache(Cache value) {
170: this .cache = value;
171: }
172:
173: public ClassLoader getClassLoader() {
174: return classLoader;
175: }
176:
177: public void setClassLoader(ClassLoader value) {
178: this .classLoader = value;
179: }
180:
181: public JspConfig getJspConfig() {
182: return jspConfig;
183: }
184:
185: public void setJspConfig(JspConfig value) {
186: this .jspConfig = value;
187: }
188:
189: public LocaleCharsetInfo getLocaleCharsetInfo() {
190: return localeCharsetInfo;
191: }
192:
193: public void setLocaleCharsetInfo(LocaleCharsetInfo value) {
194: this .localeCharsetInfo = value;
195: }
196:
197: public ParameterEncoding getParameterEncoding() {
198: return parameterEncoding;
199: }
200:
201: public void setParameterEncoding(ParameterEncoding value) {
202: this .parameterEncoding = value;
203: }
204:
205: public List<Property> getProperty() {
206: if (property == null) {
207: property = new ArrayList<Property>();
208: }
209: return this .property;
210: }
211:
212: public List<MessageDestination> getMessageDestination() {
213: if (messageDestination == null) {
214: messageDestination = new ArrayList<MessageDestination>();
215: }
216: return this .messageDestination;
217: }
218:
219: public List<WebserviceDescription> getWebserviceDescription() {
220: if (webserviceDescription == null) {
221: webserviceDescription = new ArrayList<WebserviceDescription>();
222: }
223: return this.webserviceDescription;
224: }
225: }
|