Search in sources :

Example 6 with ServletMetaData

use of org.jboss.metadata.web.spec.ServletMetaData in project wildfly by wildfly.

the class JaxrsScanningProcessor method checkOtherParams.

private void checkOtherParams(final DeploymentUnit du, final JBossWebMetaData webdata, final ClassLoader classLoader, final ResteasyDeploymentData resteasyDeploymentData) throws DeploymentUnitProcessingException {
    HashSet<String> appClazzList = new HashSet<>();
    List<ParamValueMetaData> contextParamList = webdata.getContextParams();
    if (contextParamList != null) {
        for (ParamValueMetaData param : contextParamList) {
            if ("javax.ws.rs.core.Application".equals(param.getParamName())) {
                appClazzList.add(param.getParamValue());
            }
        }
    }
    if (webdata.getServlets() != null) {
        for (ServletMetaData servlet : webdata.getServlets()) {
            List<ParamValueMetaData> initParamList = servlet.getInitParam();
            if (initParamList != null) {
                for (ParamValueMetaData param : initParamList) {
                    if ("javax.ws.rs.core.Application".equals(param.getParamName())) {
                        appClazzList.add(param.getParamValue());
                    }
                }
            }
        }
    }
    processDeclaredApplicationClasses(du, appClazzList, webdata, classLoader, resteasyDeploymentData);
}
Also used : ParamValueMetaData(org.jboss.metadata.javaee.spec.ParamValueMetaData) ServletMetaData(org.jboss.metadata.web.spec.ServletMetaData) HashSet(java.util.HashSet)

Aggregations

ServletMetaData (org.jboss.metadata.web.spec.ServletMetaData)6 ParamValueMetaData (org.jboss.metadata.javaee.spec.ParamValueMetaData)5 HashSet (java.util.HashSet)3 DeploymentUnitProcessingException (org.jboss.as.server.deployment.DeploymentUnitProcessingException)2 ClassInfo (org.jboss.jandex.ClassInfo)2 ServletsMetaData (org.jboss.metadata.web.spec.ServletsMetaData)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 WebService (javax.jws.WebService)1 WebServiceProvider (javax.xml.ws.WebServiceProvider)1 Descriptions (org.jboss.annotation.javaee.Descriptions)1 ComponentDescription (org.jboss.as.ee.component.ComponentDescription)1 EEModuleClassDescription (org.jboss.as.ee.component.EEModuleClassDescription)1 EEModuleDescription (org.jboss.as.ee.component.EEModuleDescription)1 CompositeIndex (org.jboss.as.server.deployment.annotation.CompositeIndex)1 EJBEndpoint (org.jboss.as.webservices.metadata.model.EJBEndpoint)1 JAXWSDeployment (org.jboss.as.webservices.metadata.model.JAXWSDeployment)1 POJOEndpoint (org.jboss.as.webservices.metadata.model.POJOEndpoint)1 ASHelper.getJBossWebMetaData (org.jboss.as.webservices.util.ASHelper.getJBossWebMetaData)1 ASHelper.getWebserviceMetadataEJBEndpoint (org.jboss.as.webservices.util.ASHelper.getWebserviceMetadataEJBEndpoint)1