@Override public Set<String> addMapping(String... urlPatterns) { Set<String> conflicts = super.addMapping(urlPatterns); if (conflicts.isEmpty() && urlPatterns != null && urlPatterns.length > 0) { /* * Propagate the new mappings to the underlying * WebBundleDescriptor provided by the deployment backend, * so that corresponding security constraints may be calculated * by the security subsystem, which uses the * WebBundleDescriptor as its input */ for (String urlPattern : urlPatterns) { wcd.addUrlPattern(urlPattern); } } return conflicts; }
/** * receives notification of the end of an XML element by the Parser * * @param element the xml tag identification * @return true if this node is done processing the XML sub tree */ public boolean endElement(XMLElement element) { if (WebTagNames.DISTRIBUTABLE.equals(element.getQName())) { descriptor.setDistributable(true); return false; } else { boolean allDone = super.endElement(element); if (allDone && servletMappings!=null) { for (Iterator keys = servletMappings.keySet().iterator(); keys.hasNext();) { String servletName = (String) keys.next(); Vector mappings = (Vector) servletMappings.get(servletName); WebComponentDescriptor servlet= descriptor.getWebComponentByCanonicalName(servletName); if (servlet!=null) { for (Iterator mapping = mappings.iterator();mapping.hasNext();) { servlet.addUrlPattern((String) mapping.next()); } } else { throw new RuntimeException("There is no web component by the name of " + servletName + " here."); } } } return allDone; } }
@Override public Set<String> addMapping(String... urlPatterns) { Set<String> conflicts = super.addMapping(urlPatterns); if (conflicts.isEmpty() && urlPatterns != null && urlPatterns.length > 0) { /* * Propagate the new mappings to the underlying * WebBundleDescriptor provided by the deployment backend, * so that corresponding security constraints may be calculated * by the security subsystem, which uses the * WebBundleDescriptor as its input */ WebBundleDescriptor wbd = ((WebModule) getContext()).getWebBundleDescriptor(); if (wbd == null) { throw new IllegalStateException( "Missing WebBundleDescriptor for " + getContext().getName()); } WebComponentDescriptor wcd = wbd.getWebComponentByCanonicalName(getName()); if (wcd == null) { throw new IllegalStateException( "Missing WebComponentDescriptor for " + getName()); } for (String urlPattern : urlPatterns) { wcd.addUrlPattern(urlPattern); } } return conflicts; } }
String publishingUrlPattern = (publishingUri.charAt(0) == '/') ?publishingUri : "/" + publishingUri + "/*"; webComp.addUrlPattern(publishingUrlPattern);
break; webCompDesc.addUrlPattern(up);
webComponent.setWebComponentImplementation(((Class) annElem).getCanonicalName()); webComponent.setName(endpoint.getEndpointName()); webComponent.addUrlPattern("/"+newWS.getName()); webBundle.addWebComponentDescriptor(webComponent);
webComponent.setWebComponentImplementation(((Class) annElem).getCanonicalName()); webComponent.setName(endpoint.getEndpointName()); webComponent.addUrlPattern("/"+newWS.getName()); webBundle.addWebComponentDescriptor(webComponent);
webComponent.setWebComponentImplementation(((Class) annElem).getCanonicalName()); webComponent.setName(endpoint.getEndpointName()); webComponent.addUrlPattern("/"+newWS.getName()); webBundle.addWebComponentDescriptor(webComponent);
webComponent.setWebComponentImplementation(((Class) annElem).getCanonicalName()); webComponent.setName(endpoint.getEndpointName()); webComponent.addUrlPattern("/"+newWS.getName()); webBundle.addWebComponentDescriptor(webComponent);