com.sun.grizzly.http.webxml.parser.JAXBWebXml_3_0Parser Maven / Gradle / Ivy
The newest version!
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.grizzly.http.webxml.parser;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
import com.sun.grizzly.http.webxml.schema.version_2_3.ServletName;
import com.sun.grizzly.http.webxml.schema.version_2_3.UrlPattern;
import com.sun.grizzly.http.webxml.schema.version_3_0.AuthConstraintType;
import com.sun.grizzly.http.webxml.schema.version_3_0.CookieConfigType;
import com.sun.grizzly.http.webxml.schema.version_3_0.DescriptionType;
import com.sun.grizzly.http.webxml.schema.version_3_0.DispatcherType;
import com.sun.grizzly.http.webxml.schema.version_3_0.DisplayNameType;
import com.sun.grizzly.http.webxml.schema.version_3_0.EjbLocalRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.EjbRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.EnvEntryType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ErrorPageType;
import com.sun.grizzly.http.webxml.schema.version_3_0.FilterMappingType;
import com.sun.grizzly.http.webxml.schema.version_3_0.FilterType;
import com.sun.grizzly.http.webxml.schema.version_3_0.IconType;
import com.sun.grizzly.http.webxml.schema.version_3_0.InjectionTargetType;
import com.sun.grizzly.http.webxml.schema.version_3_0.JspConfigType;
import com.sun.grizzly.http.webxml.schema.version_3_0.JspPropertyGroupType;
import com.sun.grizzly.http.webxml.schema.version_3_0.LifecycleCallbackType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ListenerType;
import com.sun.grizzly.http.webxml.schema.version_3_0.LocaleEncodingMappingListType;
import com.sun.grizzly.http.webxml.schema.version_3_0.LocaleEncodingMappingType;
import com.sun.grizzly.http.webxml.schema.version_3_0.LoginConfigType;
import com.sun.grizzly.http.webxml.schema.version_3_0.MessageDestinationRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.MessageDestinationType;
import com.sun.grizzly.http.webxml.schema.version_3_0.MimeMappingType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ParamValueType;
import com.sun.grizzly.http.webxml.schema.version_3_0.PathType;
import com.sun.grizzly.http.webxml.schema.version_3_0.PersistenceContextRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.PersistenceUnitRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.PortComponentRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.PropertyType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ResourceEnvRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ResourceRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.RoleNameType;
import com.sun.grizzly.http.webxml.schema.version_3_0.RunAsType;
import com.sun.grizzly.http.webxml.schema.version_3_0.SecurityConstraintType;
import com.sun.grizzly.http.webxml.schema.version_3_0.SecurityRoleRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.SecurityRoleType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServiceRefHandlerChainType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServiceRefHandlerChainsType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServiceRefHandlerType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServiceRefType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServletMappingType;
import com.sun.grizzly.http.webxml.schema.version_3_0.ServletType;
import com.sun.grizzly.http.webxml.schema.version_3_0.SessionConfigType;
import com.sun.grizzly.http.webxml.schema.version_3_0.TaglibType;
import com.sun.grizzly.http.webxml.schema.version_3_0.TrackingModeType;
import com.sun.grizzly.http.webxml.schema.version_3_0.UrlPatternType;
import com.sun.grizzly.http.webxml.schema.version_3_0.WebAppType;
import com.sun.grizzly.http.webxml.schema.version_3_0.WebResourceCollectionType;
import com.sun.grizzly.http.webxml.schema.version_3_0.WelcomeFileListType;
import com.sun.grizzly.http.webxml.schema.version_3_0.XsdQNameType;
public class JAXBWebXml_3_0Parser implements IJAXBWebXmlParser {
Map>> itemMap = new HashMap>>();
@SuppressWarnings("unchecked")
public com.sun.grizzly.http.webxml.schema.WebApp parse(String webxml) throws Exception {
JAXBContext jc = JAXBContext.newInstance("com.sun.grizzly.http.webxml.schema.version_3_0");
// create an Unmarshaller
Unmarshaller u = jc.createUnmarshaller();
JAXBElement root = (JAXBElement) u.unmarshal(new FileInputStream(webxml));
com.sun.grizzly.http.webxml.schema.WebApp webApp = populate((WebAppType)root.getValue());
return webApp;
}
@SuppressWarnings("unchecked")
private List populateServlet(Map>> itemMap){
if(!itemMap.containsKey("ServletType")){
return null;
}
List> list = (List>)itemMap.get("ServletType");
List servletList = new ArrayList();
for (JAXBElement obj : list) {
ServletType servlet = (ServletType)obj.getValue();
com.sun.grizzly.http.webxml.schema.Servlet servletTmp = new com.sun.grizzly.http.webxml.schema.Servlet();
if(servlet.getIcon()!=null && servlet.getIcon().size()>0){
servletTmp.setIcon(populateIcon(servlet.getIcon()));
}
if(servlet.getDescription()!=null && servlet.getDescription().size()>0){
servletTmp.setDescription(populateDescription(servlet.getDescription()));
}
if(servlet.getDisplayName()!=null && servlet.getDisplayName().size()>0){
servletTmp.setDisplayName(populateDisplayName(servlet.getDisplayName()));
}
if(servlet.getServletName()!=null){
servletTmp.setServletName(servlet.getServletName().getValue());
}
if(servlet.getLoadOnStartup()!=null){
servletTmp.setLoadOnStartup(servlet.getLoadOnStartup());
}
if(servlet.getJspFile()!=null){
servletTmp.setJspFile(servlet.getJspFile().getValue());
}
if(servlet.getServletClass()!=null){
servletTmp.setServletClass(servlet.getServletClass().getValue());
}
if(servlet.getAsyncSupported()!=null){
servletTmp.setAsyncSupported(true);
}
if(servlet.getAsyncTimeout()!=null){
servletTmp.setAsyncTimeout(servlet.getAsyncTimeout().getValue().toString());
}
if(servlet.getRunAs()!=null){
servletTmp.setRunAs(getRunAs(servlet.getRunAs()));
}
List initParams = servlet.getInitParam();
if(initParams!=null){
List initParamsTmp = new ArrayList(initParams.size());
for (ParamValueType initParam : initParams) {
initParamsTmp.add(getInitParam(initParam));
}
servletTmp.setInitParam(initParamsTmp);
}
List securityRoleRefList = servlet.getSecurityRoleRef();
if(securityRoleRefList!=null){
List securityRoleRefTmpList = new ArrayList(securityRoleRefList.size());
for (SecurityRoleRefType securityRoleRef : securityRoleRefList) {
securityRoleRefTmpList.add(getSecurityRoleRef(securityRoleRef));
}
servletTmp.setSecurityRoleRef(securityRoleRefTmpList);
}
servletList.add(servletTmp);
}
return servletList;
}
@SuppressWarnings("unchecked")
protected Map>> getItemMap(List> itemList) throws Exception {
// need to find something nicer
Map>> itemMap = null;
if (itemList != null) {
itemMap = new HashMap>>();
// convert it to a Map, will be easier to retrieve values
for (JAXBElement element : itemList) {
List> list = null;
String key = element.getValue().getClass().getSimpleName();
if (itemMap.containsKey(key)) {
list = itemMap.get(key);
} else {
list = new ArrayList>();
itemMap.put(key, list);
}
list.add(element);
}
} else {
// error handling when list is null ...
throw new Exception("invalid");
}
return itemMap;
}
private com.sun.grizzly.http.webxml.schema.WebApp populate(WebAppType root) throws Exception {
com.sun.grizzly.http.webxml.schema.WebApp webApp = new com.sun.grizzly.http.webxml.schema.WebApp();
List> itemList = root.getDescriptionAndDisplayNameAndIcon();
// extract the items from the web.xml
Map>> itemMap = getItemMap(itemList);
if (itemMap == null || itemMap.size()==0) {
throw new Exception("invalid");
}
// Distributable
if(itemMap.containsKey("EmptyType")){
webApp.setDistributable(true);
}
// metadata-complete
if(root.isMetadataComplete()){
webApp.setMetadataComplete(true);
}
webApp.setDisplayName(populateDisplayName(itemMap));
webApp.setDescription(populateDescription(itemMap));
webApp.setIcon(populateIcon(itemMap));
webApp.setServlet(populateServlet(itemMap));
webApp.setServletMapping(populateServletMapping(itemMap));
webApp.setFilter(populateFilter(itemMap));
webApp.setFilterMapping(populateFilterMapping(itemMap));
webApp.setContextParam(populateContextParam(itemMap));
webApp.setEjbLocalRef(populateEjbLocalRef(itemMap));
webApp.setEjbRef(populateEjbRef(itemMap));
webApp.setEnvEntry(populateEnvEntry(itemMap));
webApp.setErrorPage(populateErrorPage(itemMap));
webApp.setJspConfig(populateJspConfig(itemMap));
webApp.setListener(populateListener(itemMap));
webApp.setLoginConfig(populateLoginConfig(itemMap));
webApp.setMimeMapping(populateMimeMapping(itemMap));
webApp.setResourceRef(populateResourceRef(itemMap));
webApp.setResourceEnvRef(populateResourceEnvRef(itemMap));
webApp.setServiceRef(populateServiceRef(itemMap));
webApp.setSecurityConstraint(populateSecurityConstraint(itemMap));
webApp.setSecurityRole(populateSecurityRole(itemMap));
webApp.setSessionConfig(populateSessionConfig(itemMap));
webApp.setWelcomeFileList(populateWelcomeFileList(itemMap));
webApp.setMessageDestination(populateMessageDestination(itemMap));
webApp.setMessageDestinationRef(populateMessageDestinationRef(itemMap));
webApp.setPersistenceContextRef(populatePersistenceContextRef(itemMap));
webApp.setPersistenceUnitRef(populatePersistenceUnitRef(itemMap));
// pre-construct and pre-destroy
webApp.setPreDestroy(populatePreDestroyList(itemMap));
webApp.setPostConstruct(populatePostConstructList(itemMap));
webApp.setLocaleEncodingMappingList(populateLocaleEncodingMappingList(itemMap));
return webApp;
}
@SuppressWarnings("unchecked")
private List populatePreDestroyList(Map>> itemMap){
if(!itemMap.containsKey("LifecycleCallbackType")){
return null;
}
List> list = (List>)itemMap.get("LifecycleCallbackType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
if(obj.getName().getLocalPart().equalsIgnoreCase("pre-destroy")){
LifecycleCallbackType item = (LifecycleCallbackType)obj.getValue();
listTmp.add(getLifecycleCallback(item));
}
}
return listTmp;
}
@SuppressWarnings("unchecked")
private List populatePostConstructList(Map>> itemMap){
if(!itemMap.containsKey("LifecycleCallbackType")){
return null;
}
List> list = (List>)itemMap.get("LifecycleCallbackType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
if(obj.getName().getLocalPart().equalsIgnoreCase("post-construct")){
LifecycleCallbackType item = (LifecycleCallbackType)obj.getValue();
listTmp.add(getLifecycleCallback(item));
}
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.LifecycleCallback getLifecycleCallback(LifecycleCallbackType lifecycleCallback){
if(lifecycleCallback==null){
return null;
}
com.sun.grizzly.http.webxml.schema.LifecycleCallback lifecycleCallbackTmp = new com.sun.grizzly.http.webxml.schema.LifecycleCallback();
if(lifecycleCallback.getLifecycleCallbackClass()!=null){
lifecycleCallbackTmp.setLifecycleCallbackClass(lifecycleCallback.getLifecycleCallbackClass().getValue());
}
if(lifecycleCallback.getLifecycleCallbackMethod()!=null){
lifecycleCallbackTmp.setLifecycleCallbackMethod(lifecycleCallback.getLifecycleCallbackMethod().getValue());
}
return lifecycleCallbackTmp;
}
@SuppressWarnings("unchecked")
private List populateLocaleEncodingMappingList(Map>> itemMap){
if(!itemMap.containsKey("LocaleEncodingMappingListType")){
return null;
}
List> list = (List>)itemMap.get("LocaleEncodingMappingListType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
LocaleEncodingMappingListType item = (LocaleEncodingMappingListType)obj.getValue();
listTmp.add(getLocaleEncodingMappingList(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.LocaleEncodingMappingList getLocaleEncodingMappingList(LocaleEncodingMappingListType localeEncodingMappingList){
if(localeEncodingMappingList==null){
return null;
}
com.sun.grizzly.http.webxml.schema.LocaleEncodingMappingList localeEncodingMappingListTmp = new com.sun.grizzly.http.webxml.schema.LocaleEncodingMappingList();
if(localeEncodingMappingList.getLocaleEncodingMapping()!=null && localeEncodingMappingList.getLocaleEncodingMapping().size()>0){
localeEncodingMappingListTmp.setLocaleEncodingMapping(populateLocaleEncodingMapping(localeEncodingMappingList.getLocaleEncodingMapping()));
}
return localeEncodingMappingListTmp;
}
private List populateLocaleEncodingMapping(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (LocaleEncodingMappingType obj : list) {
LocaleEncodingMappingType item = (LocaleEncodingMappingType)obj;
com.sun.grizzly.http.webxml.schema.LocaleEncodingMapping mapping = new com.sun.grizzly.http.webxml.schema.LocaleEncodingMapping();
mapping.setLocale(item.getLocale());
mapping.setEncoding(item.getEncoding());
listTmp.add(mapping);
}
return listTmp;
}
@SuppressWarnings("unchecked")
private List populatePersistenceUnitRef(Map>> itemMap){
if(!itemMap.containsKey("PersistenceUnitRefType")){
return null;
}
List> list = (List>)itemMap.get("PersistenceUnitRefType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
PersistenceUnitRefType item = (PersistenceUnitRefType)obj.getValue();
listTmp.add(getPersistenceUnitRef(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.PersistenceUnitRef getPersistenceUnitRef(PersistenceUnitRefType persistenceUnitRef){
if(persistenceUnitRef==null){
return null;
}
com.sun.grizzly.http.webxml.schema.PersistenceUnitRef persistenceUnitRefTmp = new com.sun.grizzly.http.webxml.schema.PersistenceUnitRef();
if(persistenceUnitRef.getDescription()!=null && persistenceUnitRef.getDescription().size()>0){
persistenceUnitRefTmp.setDescription(populateDescription(persistenceUnitRef.getDescription()));
}
if(persistenceUnitRef.getPersistenceUnitName()!=null){
persistenceUnitRefTmp.setPersistenceUnitName(persistenceUnitRef.getPersistenceUnitName().getValue());
}
if(persistenceUnitRef.getPersistenceUnitRefName()!=null){
persistenceUnitRefTmp.setPersistenceUnitRefName(persistenceUnitRef.getPersistenceUnitRefName().getValue());
}
if(persistenceUnitRef.getMappedName()!=null){
persistenceUnitRefTmp.setMappedName(persistenceUnitRef.getMappedName().getValue());
}
if(persistenceUnitRef.getInjectionTarget()!=null && persistenceUnitRef.getInjectionTarget().size()>0){
persistenceUnitRefTmp.setInjectionTarget(populateInjectionTarget(persistenceUnitRef.getInjectionTarget()));
}
return persistenceUnitRefTmp;
}
@SuppressWarnings("unchecked")
private List populatePersistenceContextRef(Map>> itemMap){
if(!itemMap.containsKey("PersistenceContextRefType")){
return null;
}
List> list = (List>)itemMap.get("PersistenceContextRefType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
PersistenceContextRefType item = (PersistenceContextRefType)obj.getValue();
listTmp.add(getPersistenceContextRef(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.PersistenceContextRef getPersistenceContextRef(PersistenceContextRefType persistenceContextRef){
if(persistenceContextRef==null){
return null;
}
com.sun.grizzly.http.webxml.schema.PersistenceContextRef persistenceContextRefTmp = new com.sun.grizzly.http.webxml.schema.PersistenceContextRef();
if(persistenceContextRef.getDescription()!=null && persistenceContextRef.getDescription().size()>0){
persistenceContextRefTmp.setDescription(populateDescription(persistenceContextRef.getDescription()));
}
if(persistenceContextRef.getPersistenceContextRefName()!=null){
persistenceContextRefTmp.setPersistenceContextRefName(persistenceContextRef.getPersistenceContextRefName().getValue());
}
if(persistenceContextRef.getPersistenceContextType()!=null){
persistenceContextRefTmp.setPersistenceContextType(persistenceContextRef.getPersistenceContextType().getValue());
}
if(persistenceContextRef.getPersistenceUnitName()!=null){
persistenceContextRefTmp.setPersistenceUnitName(persistenceContextRef.getPersistenceUnitName().getValue());
}
if(persistenceContextRef.getPersistenceProperty()!=null && persistenceContextRef.getPersistenceProperty().size()>0){
persistenceContextRefTmp.setPersistenceProperty(populatePersistenceProperty(persistenceContextRef.getPersistenceProperty()));
}
if(persistenceContextRef.getMappedName()!=null){
persistenceContextRefTmp.setMappedName(persistenceContextRef.getMappedName().getValue());
}
if(persistenceContextRef.getInjectionTarget()!=null && persistenceContextRef.getInjectionTarget().size()>0){
persistenceContextRefTmp.setInjectionTarget(populateInjectionTarget(persistenceContextRef.getInjectionTarget()));
}
return persistenceContextRefTmp;
}
private List populatePersistenceProperty(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (PropertyType obj : list) {
PropertyType item = (PropertyType)obj;
com.sun.grizzly.http.webxml.schema.Property property = new com.sun.grizzly.http.webxml.schema.Property();
property.setName(item.getName().getValue());
property.setValue(item.getValue().getValue());
listTmp.add(property);
}
return listTmp;
}
@SuppressWarnings("unchecked")
private List populateMessageDestinationRef(Map>> itemMap){
if(!itemMap.containsKey("MessageDestinationRefType")){
return null;
}
List> list = (List>)itemMap.get("MessageDestinationRefType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
MessageDestinationRefType item = (MessageDestinationRefType)obj.getValue();
listTmp.add(getMessageDestinationRef(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.MessageDestinationRef getMessageDestinationRef(MessageDestinationRefType messageDestinationRef){
if(messageDestinationRef==null){
return null;
}
com.sun.grizzly.http.webxml.schema.MessageDestinationRef messageDestinationRefTmp = new com.sun.grizzly.http.webxml.schema.MessageDestinationRef();
if(messageDestinationRef.getDescription()!=null && messageDestinationRef.getDescription().size()>0){
messageDestinationRefTmp.setDescription(populateDescription(messageDestinationRef.getDescription()));
}
if(messageDestinationRef.getMessageDestinationLink()!=null){
messageDestinationRefTmp.setMessageDestinationLink(messageDestinationRef.getMessageDestinationLink().getValue());
}
if(messageDestinationRef.getMessageDestinationRefName()!=null){
messageDestinationRefTmp.setMessageDestinationRefName(messageDestinationRef.getMessageDestinationRefName().getValue());
}
if(messageDestinationRef.getMessageDestinationType()!=null){
messageDestinationRefTmp.setMessageDestinationType(messageDestinationRef.getMessageDestinationType().getValue());
}
if(messageDestinationRef.getMappedName()!=null){
messageDestinationRefTmp.setMappedName(messageDestinationRef.getMappedName().getValue());
}
if(messageDestinationRef.getInjectionTarget()!=null && messageDestinationRef.getInjectionTarget().size()>0){
messageDestinationRefTmp.setInjectionTarget(populateInjectionTarget(messageDestinationRef.getInjectionTarget()));
}
return messageDestinationRefTmp;
}
@SuppressWarnings("unchecked")
private List populateMessageDestination(Map>> itemMap){
if(!itemMap.containsKey("MessageDestinationType")){
return null;
}
List> list = (List>)itemMap.get("MessageDestinationType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
MessageDestinationType item = (MessageDestinationType)obj.getValue();
listTmp.add(getMessageDestination(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.MessageDestination getMessageDestination(MessageDestinationType messageDestination){
if(messageDestination==null){
return null;
}
com.sun.grizzly.http.webxml.schema.MessageDestination messageDestinationTmp = new com.sun.grizzly.http.webxml.schema.MessageDestination();
if(messageDestination.getDescription()!=null && messageDestination.getDescription().size()>0){
messageDestinationTmp.setDescription(populateDescription(messageDestination.getDescription()));
}
if(messageDestination.getDisplayName()!=null && messageDestination.getDisplayName().size()>0){
messageDestinationTmp.setDisplayName(populateDisplayName(messageDestination.getDisplayName()));
}
if(messageDestination.getMessageDestinationName()!=null){
messageDestinationTmp.setMessageDestinationName(messageDestination.getMessageDestinationName().getValue());
}
if(messageDestination.getIcon()!=null && messageDestination.getIcon().size()>0){
messageDestinationTmp.setIcon(populateIcon(messageDestination.getIcon()));
}
if(messageDestination.getMappedName()!=null){
messageDestinationTmp.setMappedName(messageDestination.getMappedName().getValue());
}
return messageDestinationTmp;
}
@SuppressWarnings("unchecked")
private List populateServiceRef(Map>> itemMap){
if(!itemMap.containsKey("ServiceRefType")){
return null;
}
List> list = (List>)itemMap.get("ServiceRefType");
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
ServiceRefType item = (ServiceRefType)obj.getValue();
listTmp.add(getServiceRef(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.ServiceRef getServiceRef(ServiceRefType serviceRef){
if(serviceRef==null){
return null;
}
com.sun.grizzly.http.webxml.schema.ServiceRef serviceRefTmp = new com.sun.grizzly.http.webxml.schema.ServiceRef();
if(serviceRef.getDescription()!=null && serviceRef.getDescription().size()>0){
serviceRefTmp.setDescription(populateDescription(serviceRef.getDescription()));
}
if(serviceRef.getDisplayName()!=null && serviceRef.getDisplayName().size()>0){
serviceRefTmp.setDisplayName(populateDisplayName(serviceRef.getDisplayName()));
}
if(serviceRef.getHandler()!=null && serviceRef.getHandler().size()>0){
serviceRefTmp.setHandler(populateHandler(serviceRef.getHandler()));
}
if(serviceRef.getHandlerChains()!=null){
serviceRefTmp.setHandlerChains(getHandlerChains(serviceRef.getHandlerChains()));
}
if(serviceRef.getIcon()!=null && serviceRef.getIcon().size()>0){
serviceRefTmp.setIcon(populateIcon(serviceRef.getIcon()));
}
if(serviceRef.getMappedName()!=null){
serviceRefTmp.setMappedName(serviceRef.getMappedName().getValue());
}
if(serviceRef.getInjectionTarget()!=null && serviceRef.getInjectionTarget().size()>0){
serviceRefTmp.setInjectionTarget(populateInjectionTarget(serviceRef.getInjectionTarget()));
}
if(serviceRef.getJaxrpcMappingFile()!=null){
serviceRefTmp.setJaxrpcMappingFile(serviceRef.getJaxrpcMappingFile().getValue());
}
if(serviceRef.getPortComponentRef()!=null && serviceRef.getPortComponentRef().size()>0){
serviceRefTmp.setPortComponentRef(populatePortComponentRef(serviceRef.getPortComponentRef()));
}
if(serviceRef.getServiceInterface()!=null){
serviceRefTmp.setServiceInterface(serviceRef.getServiceInterface().getValue());
}
if(serviceRef.getServiceQname()!=null){
serviceRefTmp.setServiceQname(serviceRef.getServiceQname().getValue());
}
if(serviceRef.getServiceRefName()!=null){
serviceRefTmp.setServiceRefName(serviceRef.getServiceRefName().getValue());
}
if(serviceRef.getServiceRefType()!=null){
serviceRefTmp.setServiceRefType(serviceRef.getServiceRefType().getValue());
}
if(serviceRef.getWsdlFile()!=null){
serviceRefTmp.setWsdlFile(serviceRef.getWsdlFile().getValue());
}
return serviceRefTmp;
}
private List populatePortComponentRef(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (PortComponentRefType obj : list) {
PortComponentRefType item = (PortComponentRefType)obj;
listTmp.add(getPortComponentRef(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.PortComponentRef getPortComponentRef(PortComponentRefType portComponentRefType){
if(portComponentRefType==null){
return null;
}
com.sun.grizzly.http.webxml.schema.PortComponentRef portComponentRefTmp = new com.sun.grizzly.http.webxml.schema.PortComponentRef();
if(portComponentRefType.getEnableMtom()!=null){
portComponentRefTmp.setEnableMtom(portComponentRefType.getEnableMtom().isValue());
}
if(portComponentRefType.getPortComponentLink()!=null){
portComponentRefTmp.setPortComponentLink(portComponentRefType.getPortComponentLink().getValue());
}
if(portComponentRefType.getServiceEndpointInterface()!=null){
portComponentRefTmp.setServiceEndpointInterface(portComponentRefType.getServiceEndpointInterface().getValue());
}
return portComponentRefTmp;
}
private List populateHandler(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (ServiceRefHandlerType obj : list) {
ServiceRefHandlerType item = (ServiceRefHandlerType)obj;
listTmp.add(getServiceRefHandler(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChains getHandlerChains(ServiceRefHandlerChainsType serviceRefHandlerChains){
if(serviceRefHandlerChains==null){
return null;
}
com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChains serviceRefHandlerChainsTmp = new com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChains();
if(serviceRefHandlerChains.getHandlerChain()!=null && serviceRefHandlerChains.getHandlerChain().size()>0){
serviceRefHandlerChainsTmp.setHandlerChain(populateHandlerChain(serviceRefHandlerChains.getHandlerChain()));
}
return serviceRefHandlerChainsTmp;
}
private List populateHandlerChain(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (ServiceRefHandlerChainType obj : list) {
ServiceRefHandlerChainType item = (ServiceRefHandlerChainType)obj;
listTmp.add(getServiceRefHandlerChain(item));
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChain getServiceRefHandlerChain(ServiceRefHandlerChainType serviceRefHandlerChain){
if(serviceRefHandlerChain==null){
return null;
}
com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChain serviceRefHandlerChainsTmp = new com.sun.grizzly.http.webxml.schema.ServiceRefHandlerChain();
if(serviceRefHandlerChain.getHandler()!=null && serviceRefHandlerChain.getHandler().size()>0){
serviceRefHandlerChainsTmp.setHandler(populateHandler(serviceRefHandlerChain.getHandler()));
}
if(serviceRefHandlerChain.getPortNamePattern()!=null){
serviceRefHandlerChainsTmp.setPortNamePattern(serviceRefHandlerChain.getPortNamePattern());
}
if(serviceRefHandlerChain.getProtocolBindings()!=null && serviceRefHandlerChain.getHandler().size()>0){
serviceRefHandlerChainsTmp.setProtocolBindings(serviceRefHandlerChain.getProtocolBindings());
}
if(serviceRefHandlerChain.getServiceNamePattern()!=null){
serviceRefHandlerChainsTmp.setServiceNamePattern(serviceRefHandlerChain.getServiceNamePattern());
}
return serviceRefHandlerChainsTmp;
}
private com.sun.grizzly.http.webxml.schema.ServiceRefHandler getServiceRefHandler(ServiceRefHandlerType serviceRefHandler){
if(serviceRefHandler==null){
return null;
}
com.sun.grizzly.http.webxml.schema.ServiceRefHandler serviceRefHandlerTmp = new com.sun.grizzly.http.webxml.schema.ServiceRefHandler();
if(serviceRefHandler.getDescription()!=null && serviceRefHandler.getDescription().size()>0){
serviceRefHandlerTmp.setDescription(populateDescription(serviceRefHandler.getDescription()));
}
if(serviceRefHandler.getDisplayName()!=null && serviceRefHandler.getDisplayName().size()>0){
serviceRefHandlerTmp.setDisplayName(populateDisplayName(serviceRefHandler.getDisplayName()));
}
if(serviceRefHandler.getHandlerClass()!=null){
serviceRefHandlerTmp.setHandlerClass(serviceRefHandler.getHandlerClass().getValue());
}
if(serviceRefHandler.getHandlerName()!=null){
serviceRefHandlerTmp.setHandlerName(serviceRefHandler.getHandlerName().getValue());
}
if(serviceRefHandler.getPortName()!=null && serviceRefHandler.getPortName().size()>0){
serviceRefHandlerTmp.setPortName(populatePortName(serviceRefHandler.getPortName()));
}
if(serviceRefHandler.getSoapRole()!=null && serviceRefHandler.getSoapRole().size()>0){
serviceRefHandlerTmp.setSoapRole(populateSoapRole(serviceRefHandler.getSoapRole()));
}
if(serviceRefHandler.getSoapHeader()!=null && serviceRefHandler.getSoapHeader().size()>0){
serviceRefHandlerTmp.setSoapHeader(populateSoapHeader(serviceRefHandler.getSoapHeader()));
}
List initParams = serviceRefHandler.getInitParam();
if(initParams!=null){
List initParamsTmp = new ArrayList(initParams.size());
for (ParamValueType initParam : initParams) {
initParamsTmp.add(getInitParam(initParam));
}
serviceRefHandlerTmp.setInitParam(initParamsTmp);
}
return serviceRefHandlerTmp;
}
private List populateSoapHeader(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (XsdQNameType obj : list) {
QName item = (QName)obj.getValue();
listTmp.add(item);
}
return listTmp;
}
private List populatePortName(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (com.sun.grizzly.http.webxml.schema.version_3_0.String obj : list) {
listTmp.add(((com.sun.grizzly.http.webxml.schema.version_3_0.String) obj).getValue());
}
return listTmp;
}
private List populateSoapRole(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (com.sun.grizzly.http.webxml.schema.version_3_0.String obj : list) {
listTmp.add(((com.sun.grizzly.http.webxml.schema.version_3_0.String) obj).getValue());
}
return listTmp;
}
@SuppressWarnings("unchecked")
private List populateSecurityConstraint(Map>> itemMap){
if(!itemMap.containsKey("SecurityConstraintType")){
return null;
}
List> list = (List>)itemMap.get("SecurityConstraintType");
List securityConstraintList = new ArrayList(list.size());
for (JAXBElement obj : list) {
SecurityConstraintType security = (SecurityConstraintType)obj.getValue();
securityConstraintList.add(getSecurityConstraint(security));
}
return securityConstraintList;
}
private List populateInjectionTarget(List list){
if(list==null){
return null;
}
List tmpList = new ArrayList(list.size());
for (InjectionTargetType obj : list) {
InjectionTargetType item = (InjectionTargetType)obj;
tmpList.add(getInjectionTarget(item));
}
return tmpList;
}
private com.sun.grizzly.http.webxml.schema.InjectionTarget getInjectionTarget(InjectionTargetType injectionTarget){
if(injectionTarget==null){
return null;
}
com.sun.grizzly.http.webxml.schema.InjectionTarget injectionTargetTmp = new com.sun.grizzly.http.webxml.schema.InjectionTarget();
if(injectionTarget.getInjectionTargetClass()!=null){
injectionTargetTmp.setInjectionTargetClass(injectionTarget.getInjectionTargetClass().getValue());
}
if(injectionTarget.getInjectionTargetName()!=null){
injectionTargetTmp.setInjectionTargetName(injectionTarget.getInjectionTargetName().getValue());
}
return injectionTargetTmp;
}
@SuppressWarnings("unchecked")
private List populateJspConfig(Map>> itemMap){
if(!itemMap.containsKey("JspConfigType")){
return null;
}
List> list = (List>)itemMap.get("JspConfigType");
List jspConfigList = new ArrayList(list.size());
for (JAXBElement obj : list) {
JspConfigType item = (JspConfigType)obj.getValue();
jspConfigList.add(getJspConfig(item));
}
return jspConfigList;
}
private com.sun.grizzly.http.webxml.schema.JspConfig getJspConfig(JspConfigType jspConfig){
if(jspConfig==null){
return null;
}
com.sun.grizzly.http.webxml.schema.JspConfig jspConfigTmp = new com.sun.grizzly.http.webxml.schema.JspConfig();
if(jspConfig.getJspPropertyGroup()!=null){
jspConfigTmp.setJspPropertyGroup(populateJspPropertyGroup(jspConfig.getJspPropertyGroup()));
}
if(jspConfig.getTaglib()!=null){
jspConfigTmp.setTaglib(populateTaglib(jspConfig.getTaglib()));
}
return jspConfigTmp;
}
private com.sun.grizzly.http.webxml.schema.JspPropertyGroup getJspPropertyGroup(JspPropertyGroupType jspPropertyGroupType){
if(jspPropertyGroupType==null){
return null;
}
com.sun.grizzly.http.webxml.schema.JspPropertyGroup jspPropertyGroup = new com.sun.grizzly.http.webxml.schema.JspPropertyGroup();
jspPropertyGroup.setBuffer(jspPropertyGroupType.getBuffer().getValue());
jspPropertyGroup.setDefaultContentType(jspPropertyGroupType.getDefaultContentType().getValue());
jspPropertyGroup.setDeferredSyntaxAllowedAsLiteral(jspPropertyGroupType.getDeferredSyntaxAllowedAsLiteral().isValue());
jspPropertyGroup.setDescription(populateDescription(jspPropertyGroupType.getDescription()));
jspPropertyGroup.setDisplayName(populateDisplayName(jspPropertyGroupType.getDisplayName()));
jspPropertyGroup.setElIgnored(jspPropertyGroupType.getElIgnored().isValue());
jspPropertyGroup.setErrorOnUndeclaredNamespace(jspPropertyGroupType.getErrorOnUndeclaredNamespace().isValue());
jspPropertyGroup.setIcon(populateIcon(jspPropertyGroupType.getIcon()));
jspPropertyGroup.setIncludeCoda(populateIncludeCoda(jspPropertyGroupType.getIncludeCoda()));
jspPropertyGroup.setIncludePrelude(populateIncludePrelude(jspPropertyGroupType.getIncludePrelude()));
jspPropertyGroup.setIsXml(jspPropertyGroupType.getIsXml().isValue());
jspPropertyGroup.setPageEncoding(jspPropertyGroupType.getPageEncoding().getValue());
jspPropertyGroup.setScriptingInvalid(jspPropertyGroupType.getScriptingInvalid().isValue());
jspPropertyGroup.setTrimDirectiveWhitespaces(jspPropertyGroupType.getTrimDirectiveWhitespaces().isValue());
jspPropertyGroup.setUrlPattern(populateUrlPattern(jspPropertyGroupType.getUrlPattern()));
return jspPropertyGroup;
}
private List populateUrlPattern(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (UrlPatternType obj : list) {
listTmp.add(((UrlPatternType) obj).getValue());
}
return listTmp;
}
private List populateIncludePrelude(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (PathType obj : list) {
listTmp.add(((PathType) obj).getValue());
}
return listTmp;
}
private List populateIncludeCoda(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (PathType obj : list) {
listTmp.add(((PathType) obj).getValue());
}
return listTmp;
}
private List populateDescription(List list){
if(list==null){
return null;
}
List descriptionListTmp = new ArrayList(list.size());
for (DescriptionType obj : list) {
descriptionListTmp.add(((DescriptionType) obj).getValue());
}
return descriptionListTmp;
}
@SuppressWarnings("unchecked")
private List populateDescription(Map>> itemMap){
if(!itemMap.containsKey("DescriptionType")){
return null;
}
List> list = (List>)itemMap.get("DescriptionType");
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
DescriptionType item = (DescriptionType) obj.getValue();
listTmp.add(item.getValue());
}
return listTmp;
}
private com.sun.grizzly.http.webxml.schema.SecurityConstraint getSecurityConstraint(SecurityConstraintType securityConstraint){
if(securityConstraint==null){
return null;
}
com.sun.grizzly.http.webxml.schema.SecurityConstraint securityConstraintTmp = new com.sun.grizzly.http.webxml.schema.SecurityConstraint();
if(securityConstraint.getAuthConstraint()!=null){
securityConstraintTmp.setAuthConstraint(getAuthConstraint(securityConstraint.getAuthConstraint()));
}
if(securityConstraint.getDisplayName()!=null && securityConstraint.getDisplayName().size()>0){
securityConstraintTmp.setDisplayName(populateDisplayName(securityConstraint.getDisplayName()));
}
if(securityConstraint.getUserDataConstraint()!=null){
com.sun.grizzly.http.webxml.schema.UserDataConstraint userData = new com.sun.grizzly.http.webxml.schema.UserDataConstraint();
if(securityConstraint.getUserDataConstraint().getDescription()!=null && securityConstraint.getUserDataConstraint().getDescription().size()>0){
userData.setDescription(populateDescription(securityConstraint.getUserDataConstraint().getDescription()));
}
if(securityConstraint.getUserDataConstraint().getTransportGuarantee()!=null){
userData.setTransportGuarantee(securityConstraint.getUserDataConstraint().getTransportGuarantee().getValue());
}
securityConstraintTmp.setUserDataConstraint(userData);
}
if(securityConstraint.getWebResourceCollection()!=null){
securityConstraintTmp.setWebResourceCollection(populateWebResourceCollection(securityConstraint.getWebResourceCollection()));
}
return securityConstraintTmp;
}
@SuppressWarnings("unchecked")
private List populateLoginConfig(Map>> itemMap){
if(!itemMap.containsKey("LoginConfigType")){
return null;
}
List> list = (List>)itemMap.get("LoginConfigType");
List loginConfigList = new ArrayList(list.size());
for (JAXBElement obj : list) {
LoginConfigType config = (LoginConfigType) obj.getValue();
loginConfigList.add(getLoginConfig(config));
}
return loginConfigList;
}
@SuppressWarnings("unchecked")
private List populateDisplayName(Map>> itemMap){
if(!itemMap.containsKey("DisplayNameType")){
return null;
}
List> list = (List>)itemMap.get("DisplayNameType");
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (JAXBElement obj : list) {
DisplayNameType item = (DisplayNameType) obj.getValue();
listTmp.add(item.getValue());
}
return listTmp;
}
private List populateDisplayName(List list){
if(list==null){
return null;
}
List listTmp = new ArrayList(list.size());
for (DisplayNameType obj : list) {
listTmp.add(((DisplayNameType) obj).getValue());
}
return listTmp;
}
@SuppressWarnings("unchecked")
private List populateWelcomeFileList(Map>> itemMap){
if(!itemMap.containsKey("WelcomeFileListType")){
return null;
}
List> list = (List>)itemMap.get("WelcomeFileListType");
List welcomeFileList = new ArrayList(list.size());
for (JAXBElement obj : list) {
WelcomeFileListType welcome = (WelcomeFileListType) obj.getValue();
welcomeFileList.add(getWelcomeFileList(welcome));
}
return welcomeFileList;
}
@SuppressWarnings("unchecked")
private List populateSessionConfig(Map>> itemMap){
if(!itemMap.containsKey("SessionConfigType")){
return null;
}
List> list = (List>)itemMap.get("SessionConfigType");
List sessionConfigList = new ArrayList(list.size());
for (JAXBElement obj : list) {
SessionConfigType config = (SessionConfigType) obj.getValue();
sessionConfigList.add(getSessionConfig(config));
}
return sessionConfigList;
}
@SuppressWarnings("unchecked")
private List populateFilterMapping(Map>> itemMap){
if(!itemMap.containsKey("FilterMappingType")){
return null;
}
List> list = (List>)itemMap.get("FilterMappingType");
List filterMappingList = new ArrayList(list.size());
for (JAXBElement obj : list) {
FilterMappingType mapping = (FilterMappingType) obj.getValue();
filterMappingList.add(getFilterMapping(mapping));
}
return filterMappingList;
}
@SuppressWarnings("unchecked")
private List populateEnvEntry(Map>> itemMap){
if(!itemMap.containsKey("EnvEntryType")){
return null;
}
List> list = (List>)itemMap.get("EnvEntryType");
List envEntryList = new ArrayList(list.size());
for (JAXBElement obj : list) {
EnvEntryType env = (EnvEntryType)obj.getValue();
envEntryList.add(getEnvEntry(env));
}
return envEntryList;
}
@SuppressWarnings("unchecked")
private List populateEjbLocalRef(Map>> itemMap){
if(!itemMap.containsKey("EjbLocalRefType")){
return null;
}
List> list = (List>)itemMap.get("EjbLocalRefType");
List ejbLocalRefList = new ArrayList(list.size());
for (JAXBElement obj : list) {
EjbLocalRefType ejb = (EjbLocalRefType)obj.getValue();
ejbLocalRefList.add(getEjbLocalRef(ejb));
}
return ejbLocalRefList;
}
private com.sun.grizzly.http.webxml.schema.EjbLocalRef getEjbLocalRef(EjbLocalRefType ejb){
if(ejb==null){
return null;
}
com.sun.grizzly.http.webxml.schema.EjbLocalRef ejbLocalRefTmp = new com.sun.grizzly.http.webxml.schema.EjbLocalRef();
if(ejb.getEjbLink()!=null){
ejbLocalRefTmp.setEjbLink(ejb.getEjbLink().getValue());
}
if(ejb.getEjbRefName()!=null){
ejbLocalRefTmp.setEjbRefName(ejb.getEjbRefName().getValue());
}
if(ejb.getEjbRefType()!=null){
ejbLocalRefTmp.setEjbRefType(ejb.getEjbRefType().getValue());
}
if(ejb.getDescription()!=null && ejb.getDescription().size()>0){
ejbLocalRefTmp.setDescription(populateDescription(ejb.getDescription()));
}
if(ejb.getLocal()!=null){
ejbLocalRefTmp.setLocal(ejb.getLocal().getValue());
}
if(ejb.getLocalHome()!=null){
ejbLocalRefTmp.setLocalHome(ejb.getLocalHome().getValue());
}
if(ejb.getMappedName()!=null){
ejbLocalRefTmp.setMappedName(ejb.getMappedName().getValue());
}
if(ejb.getInjectionTarget()!=null && ejb.getInjectionTarget().size()>0){
ejbLocalRefTmp.setInjectionTarget(populateInjectionTarget(ejb.getInjectionTarget()));
}
return ejbLocalRefTmp;
}
@SuppressWarnings("unchecked")
private List populateListener(Map>> itemMap){
if(!itemMap.containsKey("ListenerType")){
return null;
}
List> list = (List>)itemMap.get("ListenerType");
List contextParamList = new ArrayList(list.size());
for (JAXBElement obj : list) {
ListenerType listener = (ListenerType)obj.getValue();
contextParamList.add(getListener(listener));
}
return contextParamList;
}
@SuppressWarnings("unchecked")
private List populateFilter(Map>> itemMap){
if(!itemMap.containsKey("FilterType")){
return null;
}
List> list = (List>)itemMap.get("FilterType");
List filterList = new ArrayList(list.size());
for (JAXBElement obj : list) {
FilterType filter = (FilterType)obj.getValue();
com.sun.grizzly.http.webxml.schema.Filter filterTmp = new com.sun.grizzly.http.webxml.schema.Filter();
if(filter.getIcon()!=null && filter.getIcon().size()>0){
filterTmp.setIcon(populateIcon(filter.getIcon()));
}
if(filter.getDescription()!=null && filter.getDescription().size()>0){
filterTmp.setDescription(populateDescription(filter.getDescription()));
}
if(filter.getDisplayName()!=null && filter.getDisplayName().size()>0){
filterTmp.setDisplayName(populateDisplayName(filter.getDisplayName()));
}
if(filter.getFilterName()!=null){
filterTmp.setFilterName(filter.getFilterName().getValue());
}
if(filter.getFilterClass()!=null){
filterTmp.setFilterClass(filter.getFilterClass().getValue());
}
if(filter.getAsyncSupported()!=null){
filterTmp.setAsyncSupported(true);
}
if(filter.getAsyncTimeout()!=null){
filterTmp.setAsyncTimeout(filter.getAsyncTimeout().getValue().toString());
}
List initParams = filter.getInitParam();
if(initParams!=null){
List initParamsTmp = new ArrayList(initParams.size());
for (ParamValueType initParam : initParams) {
initParamsTmp.add(getInitParam(initParam));
}
filterTmp.setInitParam(initParamsTmp);
}
filterList.add(filterTmp);
}
return filterList;
}
private com.sun.grizzly.http.webxml.schema.InitParam getInitParam(ParamValueType initParam){
if(initParam==null){
return null;
}
com.sun.grizzly.http.webxml.schema.InitParam initParamTmp = new com.sun.grizzly.http.webxml.schema.InitParam();
if(initParam.getParamName()!=null){
initParamTmp.setParamName(initParam.getParamName().getValue());
}
if(initParam.getParamValue()!=null){
initParamTmp.setParamValue(initParam.getParamValue().getValue());
}
if(initParam.getDescription()!=null && initParam.getDescription().size()>0){
initParamTmp.setDescription(populateDescription(initParam.getDescription()));
}
return initParamTmp;
}
private com.sun.grizzly.http.webxml.schema.FilterMapping getFilterMapping(FilterMappingType filterMapping){
if(filterMapping==null){
return null;
}
com.sun.grizzly.http.webxml.schema.FilterMapping filterMappingTmp = new com.sun.grizzly.http.webxml.schema.FilterMapping();
if(filterMapping.getFilterName()!=null){
filterMappingTmp.setFilterName(filterMapping.getFilterName().getValue());
}
if(filterMapping.getUrlPatternOrServletName()!=null){
List