Package org.eclipse.jst.javaee.web

Examples of org.eclipse.jst.javaee.web.FilterMapping


   
    public static void updateFilterMappings(final WebApp webApp,
            final Filter filter, final String displayName)
    {
        // update mappings for new name
        FilterMapping mapping = findFilterMapping(webApp, filter);
        if (mapping != null)
        {
            mapping.setFilterName(displayName);
        }
    }
View Full Code Here


    return null;
    }
   
    public static FilterMapping findFilterMapping(final WebApp webApp, final Filter filter) {
    for (Iterator it=webApp.getFilterMappings().iterator();it.hasNext();){
      FilterMapping mapping = (FilterMapping)it.next();
      if (mapping.getFilterName() != null &&
          filter.getFilterName() != null &&
          mapping.getFilterName().trim().equals(filter.getFilterName().trim()))
        return mapping;
        }
    return null;
    }
View Full Code Here

            final List<String> urlMappingList, final Filter filter)
    {

        if (urlMappingList.size() > 0)
        {
            FilterMapping mapping = findFilterMapping(webApp, filter);
            if (mapping == null)
            {
                mapping = WebFactory.eINSTANCE.createFilterMapping();
                mapping.setFilterName(filter.getFilterName());
                webApp.getFilterMappings().add(mapping);
            }
            // Add patterns
            for (final String pattern : urlMappingList)
            {

                UrlPatternType urlPattern = JavaeeFactory.eINSTANCE
                        .createUrlPatternType();
                urlPattern.setValue(pattern);
                mapping.getUrlPatterns().add(urlPattern);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.javaee.web.FilterMapping

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.