Package org.jboss.metadata.web.spec

Examples of org.jboss.metadata.web.spec.FilterMappingMetaData


      WBL = new ListenerMetaData();
      WBL.setListenerClass("org.jboss.webbeans.servlet.WebBeansListener");
      CPF = new FilterMetaData();
      CPF.setFilterName("Web Beans Conversation Propagation Filter");
      CPF.setFilterClass("org.jboss.webbeans.servlet.ConversationPropagationFilter");
      CPFM = new FilterMappingMetaData();
      CPFM.setFilterName("Web Beans Conversation Propagation Filter");
      CPFM.setUrlPatterns(Arrays.asList("/*"));
   }
View Full Code Here


        JIL = new ListenerMetaData();
        JIL.setListenerClass(JSP_LISTENER);
        CPF = new FilterMetaData();
        CPF.setFilterName("Weld Conversation Propagation Filter");
        CPF.setFilterClass(CONVERSATION_FILTER);
        CPFM = new FilterMappingMetaData();
        CPFM.setFilterName("Weld Conversation Propagation Filter");
        CPFM.setUrlPatterns(Arrays.asList("/*"));
    }
View Full Code Here

        FilterMetaData filter = new FilterMetaData();
        filter.setFilterClass(Filter30Dispatcher.class.getName());
        filter.setName("Resteasy");
        filter.setAsyncSupported(true);

        FilterMappingMetaData mapping = new FilterMappingMetaData();
        mapping.setFilterName("Resteasy");
        List<String> patterns = new ArrayList<String>();
        if (useScannedApplicationClass && resteasy.getScannedApplicationClass().isAnnotationPresent(ApplicationPath.class)) {
            ApplicationPath path = resteasy.getScannedApplicationClass().getAnnotation(ApplicationPath.class);
            String pathValue = path.value().trim();
            if (!pathValue.startsWith("/")) {
                pathValue = "/" + pathValue;
            }
            String prefix = pathValue;
            if (pathValue.endsWith("/")) {
                pathValue += "*";
            } else {
                pathValue += "/*";
            }
            patterns.add(pathValue);
            setContextParameter(webdata, "resteasy.servlet.mapping.prefix", prefix);
        } else {
            patterns.add("/*");
        }
        mapping.setUrlPatterns(patterns);

        if (webdata.getFilters() == null) {
            webdata.setFilters(new FiltersMetaData());
        }
        webdata.getFilters().add(filter);
View Full Code Here

            webMetaData.setFilters( filters );
        }

        filters.add( rackFilter );

        FilterMappingMetaData filterMapping = new FilterMappingMetaData();
        filterMapping.setFilterName( RACK_FILTER_NAME );
        filterMapping.setUrlPatterns( Collections.singletonList( "*" ) );

        List<FilterMappingMetaData> filterMappings = webMetaData.getFilterMappings();

        if (filterMappings == null) {
            filterMappings = new ArrayList<FilterMappingMetaData>();
View Full Code Here

            filters = new FiltersMetaData();
            webMetaData.setFilters(filters);
        }
        filters.add(sendfileFilter);

        FilterMappingMetaData filterMapping = new FilterMappingMetaData();
        filterMapping.setFilterName(SENDFILE_FILTER_NAME);
        filterMapping.setUrlPatterns(Collections.singletonList("*"));

        List<FilterMappingMetaData> filterMappings = webMetaData.getFilterMappings();
        if (filterMappings == null) {
            filterMappings = new ArrayList<FilterMappingMetaData>();
            webMetaData.setFilterMappings(filterMappings);
View Full Code Here

        JIL = new ListenerMetaData();
        JIL.setListenerClass("org.jboss.as.weld.webtier.jsp.JspInitializationListener");
        CPF = new FilterMetaData();
        CPF.setFilterName("Weld Conversation Propagation Filter");
        CPF.setFilterClass("org.jboss.weld.servlet.ConversationPropagationFilter");
        CPFM = new FilterMappingMetaData();
        CPFM.setFilterName("Weld Conversation Propagation Filter");
        CPFM.setUrlPatterns(Arrays.asList("/*"));
    }
View Full Code Here

        JIL = new ListenerMetaData();
        JIL.setListenerClass("org.jboss.as.weld.webtier.jsp.JspInitializationListener");
        CPF = new FilterMetaData();
        CPF.setFilterName("Weld Conversation Propagation Filter");
        CPF.setFilterClass("org.jboss.weld.servlet.ConversationPropagationFilter");
        CPFM = new FilterMappingMetaData();
        CPFM.setFilterName("Weld Conversation Propagation Filter");
        CPFM.setUrlPatterns(Arrays.asList("/*"));
    }
View Full Code Here

                            (largeIconValue == null) ? "" : largeIconValue.asString());
                if (descriptionGroup != null) {
                    filter.setDescriptionGroup(descriptionGroup);
                }
                filters.add(filter);
                FilterMappingMetaData filterMapping = new FilterMappingMetaData();
                filterMapping.setFilterName(filter.getName());
                List<String> urlPatterns = new ArrayList<String>();
                List<String> servletNames = new ArrayList<String>();
                List<DispatcherType> dispatchers = new ArrayList<DispatcherType>();
                AnnotationValue urlPatternsValue = annotation.value("urlPatterns");
                if (urlPatternsValue != null) {
                    for (String urlPattern : urlPatternsValue.asStringArray()) {
                        urlPatterns.add(urlPattern);
                    }
                }
                urlPatternsValue = annotation.value();
                if (urlPatternsValue != null) {
                    for (String urlPattern : urlPatternsValue.asStringArray()) {
                        urlPatterns.add(urlPattern);
                    }
                }
                if (urlPatterns.size() > 0) {
                    filterMapping.setUrlPatterns(urlPatterns);
                }
                AnnotationValue servletNamesValue = annotation.value("servletNames");
                if (servletNamesValue != null) {
                    for (String servletName : servletNamesValue.asStringArray()) {
                        servletNames.add(servletName);
                    }
                }
                if (servletNames.size() > 0) {
                    filterMapping.setServletNames(servletNames);
                }
                AnnotationValue dispatcherTypesValue = annotation.value("dispatcherTypes");
                if (dispatcherTypesValue != null) {
                    for (String dispatcherValue : dispatcherTypesValue.asEnumArray()) {
                        dispatchers.add(DispatcherType.valueOf(dispatcherValue));
                    }
                }
                if (dispatchers.size() > 0) {
                    filterMapping.setDispatchers(dispatchers);
                }
                if (urlPatterns.size() > 0 || servletNames.size() > 0) {
                    filterMappings.add(filterMapping);
                }
            }
View Full Code Here

                            (largeIconValue == null) ? "" : largeIconValue.asString());
                if (descriptionGroup != null) {
                    filter.setDescriptionGroup(descriptionGroup);
                }
                filters.add(filter);
                FilterMappingMetaData filterMapping = new FilterMappingMetaData();
                filterMapping.setFilterName(filter.getName());
                List<String> urlPatterns = new ArrayList<String>();
                List<String> servletNames = new ArrayList<String>();
                List<DispatcherType> dispatchers = new ArrayList<DispatcherType>();
                AnnotationValue urlPatternsValue = annotation.value("urlPatterns");
                if (urlPatternsValue != null) {
                    for (String urlPattern : urlPatternsValue.asStringArray()) {
                        urlPatterns.add(urlPattern);
                    }
                }
                urlPatternsValue = annotation.value();
                if (urlPatternsValue != null) {
                    for (String urlPattern : urlPatternsValue.asStringArray()) {
                        urlPatterns.add(urlPattern);
                    }
                }
                if (urlPatterns.size() > 0) {
                    filterMapping.setUrlPatterns(urlPatterns);
                }
                AnnotationValue servletNamesValue = annotation.value("servletNames");
                if (servletNamesValue != null) {
                    for (String servletName : servletNamesValue.asStringArray()) {
                        servletNames.add(servletName);
                    }
                }
                if (servletNames.size() > 0) {
                    filterMapping.setServletNames(servletNames);
                }
                AnnotationValue dispatcherTypesValue = annotation.value("dispatcherTypes");
                if (dispatcherTypesValue != null) {
                    for (String dispatcherValue : dispatcherTypesValue.asEnumArray()) {
                        dispatchers.add(DispatcherType.valueOf(dispatcherValue));
                    }
                }
                if (dispatchers.size() > 0) {
                    filterMapping.setDispatchers(dispatchers);
                }
                if (urlPatterns.size() > 0 || servletNames.size() > 0) {
                    filterMappings.add(filterMapping);
                }
            }
View Full Code Here

      filters.add(filter);
      metaData.setFilters(filters);
      if (webFilter.urlPatterns() != null || webFilter.value() != null || webFilter.servletNames() != null)
      {
         List<FilterMappingMetaData> filterMappings = new ArrayList<FilterMappingMetaData>();
         FilterMappingMetaData filterMapping = new FilterMappingMetaData();
         filterMapping.setFilterName(filterName);
         if (webFilter.urlPatterns() != null || webFilter.value() != null)
         {
            List<String> urlPatterns = new ArrayList<String>();
            if (webFilter.urlPatterns() != null)
            {
               for (String urlPattern : webFilter.urlPatterns())
               {
                  urlPatterns.add(urlPattern);
               }
            }
            if (webFilter.value() != null)
            {
               for (String urlPattern : webFilter.value())
               {
                  urlPatterns.add(urlPattern);
               }
            }
            filterMapping.setUrlPatterns(urlPatterns);
         }
         if (webFilter.servletNames() != null)
         {
            List<String> servletNames = new ArrayList<String>();
            for (String servletName : webFilter.servletNames())
            {
               servletNames.add(servletName);
            }
            filterMapping.setServletNames(servletNames);
         }
         if (webFilter.dispatcherTypes() != null)
         {
            List<DispatcherType> dispatcherTypes = new ArrayList<DispatcherType>();
            for (javax.servlet.DispatcherType dispatcherType : webFilter.dispatcherTypes())
            {
               dispatcherTypes.add(DispatcherType.valueOf(dispatcherType.toString()));
            }
            filterMapping.setDispatchers(dispatcherTypes);
         }
         filterMappings.add(filterMapping);
         metaData.setFilterMappings(filterMappings);
      }
      return metaData;
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.spec.FilterMappingMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.