/** * @return a set of web component descriptor of given impl name. */ public WebComponentDescriptor[] getWebComponentByImplName(String name) { ArrayList<WebComponentDescriptor> webCompList = new ArrayList<WebComponentDescriptor>(); for (WebComponentDescriptor webComp : getWebComponentDescriptors()) { if (webComp.getWebComponentImplementation().equals(name)) { webCompList.add(webComp); } } return webCompList.toArray(new WebComponentDescriptor[webCompList.size()]); }
/** * Store current contents of servlet impl class in a runtime descriptor * element. The standard deployment descriptor element will be replaced at * deployment time with a container-provided servlet impl, so we need * to make a copy of this value in the runtime information. */ public void saveServletImplClass() { if( implementedByWebComponent() ) { servletImplClass = ((WebComponentDescriptor) webComponentImpl). getWebComponentImplementation(); } else { throw new IllegalStateException("requires ejb"); } }
/** * Store current contents of servlet impl class in a runtime descriptor * element. The standard deployment descriptor element will be replaced at * deployment time with a container-provided servlet impl, so we need * to make a copy of this value in the runtime information. */ public void saveServletImplClass() { if( implementedByWebComponent() ) { servletImplClass = ((WebComponentDescriptor) webComponentImpl). getWebComponentImplementation(); } else { throw new IllegalStateException("requires ejb"); } }
/** * A formatted string representing my state. */ public void print(StringBuffer toStringBuffer) { super.print(toStringBuffer); toStringBuffer.append("WebComponentDescriptor\n"); toStringBuffer.append("\n initializationParameters ").append(initializationParameters); toStringBuffer.append("\n urlPatterns ").append(urlPatterns); toStringBuffer.append("\n canonicalName ").append(canonicalName); toStringBuffer.append("\n loadOnStartUp ").append(loadOnStartUp); toStringBuffer.append("\n enabled ").append(enabled); toStringBuffer.append("\n asyncSupported ").append(asyncSupported); toStringBuffer.append("\n securityRoleReferences ").append(securityRoleReferences); toStringBuffer.append("\n multipartConfig ").append(multipartConfig); if (isServlet()) { toStringBuffer.append("\n servlet className ").append(getWebComponentImplementation()); } else { toStringBuffer.append("\n jspFileName ").append(getWebComponentImplementation()); } }
private WebComponentDescriptor getJspDescriptor(WebBundleDescriptor wbd) { for (WebComponentDescriptor wcd: wbd.getWebComponentDescriptors()) { if (!wcd.isEnabled()) { continue; } String servletName = wcd.getWebComponentImplementation(); if ("org.apache.jasper.servlet.JspServlet".equals(servletName)) { return wcd; } } return null; }
void setServletName(Set webComponentDescriptors) { Iterator it = webComponentDescriptors.iterator(); String endpointName = null; while (it.hasNext()) { WebComponentDescriptor desc = (WebComponentDescriptor)it.next(); String name = desc.getCanonicalName(); if (JAXWS_SERVLET.equals(desc.getWebComponentImplementation())) { endpointName = name; } if (desc.getSecurityRoleReferences().hasMoreElements()) { servletName = name; break; } } if (servletName == null) { servletName = endpointName; } }
public WebComponentContext(WebComponentDescriptor wComp) { setDescriptor(wComp); if (wComp.isServlet()) { componentClassName = wComp.getWebComponentImplementation(); } }
public WebComponentsContext(WebComponentDescriptor[] webComps) { webCompContexts = new WebComponentContext[webComps.length]; for (int i = 0; i < webComps.length ; i++) { webCompContexts[i] = new WebComponentContext(webComps[i]); } if (webComps[0].isServlet()) { componentClassName = webComps[0].getWebComponentImplementation(); } }
public WebComponentContext(WebComponentDescriptor wComp) { setDescriptor(wComp); if (wComp.isServlet()) { componentClassName = wComp.getWebComponentImplementation(); } }
public WebComponentsContext(WebComponentDescriptor[] webComps) { webCompContexts = new WebComponentContext[webComps.length]; for (int i = 0; i < webComps.length ; i++) { webCompContexts[i] = new WebComponentContext(webComps[i]); } if (webComps[0].isServlet()) { componentClassName = webComps[0].getWebComponentImplementation(); } }
public HandlerChainContainer[] getHandlerChainContainers(boolean serviceSideHandlerChain, Class declaringClass) { if(serviceSideHandlerChain) { List<WebServiceEndpoint> result = new ArrayList<WebServiceEndpoint>(); for (WebServiceEndpoint endpoint : getDescriptor().getWebServices().getEndpoints()) { if (endpoint.getWebComponentImpl().getWebComponentImplementation().equals(declaringClass.getName())) { result.add(endpoint); } } return(result.toArray(new HandlerChainContainer[result.size()])); } else { List<ServiceReferenceDescriptor> result = new ArrayList<ServiceReferenceDescriptor>(); result.addAll(getDescriptor().getServiceReferenceDescriptors()); return(result.toArray(new HandlerChainContainer[result.size()])); } } }
public HandlerChainContainer[] getHandlerChainContainers(boolean serviceSideHandlerChain, Class declaringClass) { if(serviceSideHandlerChain) { List<WebServiceEndpoint> result = new ArrayList<WebServiceEndpoint>(); for (WebServiceEndpoint endpoint : getDescriptor().getWebServices().getEndpoints()) { if (endpoint.getWebComponentImpl().getWebComponentImplementation().equals(declaringClass.getName())) { result.add(endpoint); } } return(result.toArray(new HandlerChainContainer[0])); } else { List<ServiceReferenceDescriptor> result = new ArrayList<ServiceReferenceDescriptor>(); result.addAll(getDescriptor().getServiceReferenceDescriptors()); return(result.toArray(new HandlerChainContainer[0])); } } }
boolean isConflict(WebComponentDescriptor other, boolean allowNullImplNameOverride) { if (conflict || other.isConflict()) { return true; } if (!getCanonicalName().equals(other.getCanonicalName())) { return false; } String otherImplFile = other.getWebComponentImplementation(); boolean matchImplName = (allowNullImplNameOverride) ? // note that "" and null are regarded as the same here (implFile == null || implFile.length() == 0 || otherImplFile == null || otherImplFile.length() == 0 || implFile.equals(otherImplFile)) : (((implFile == null || implFile.length() == 0) && (otherImplFile == null || otherImplFile.length() == 0)) || (implFile != null && implFile.equals(otherImplFile)) ); boolean otherAsyncSupported = (other.isAsyncSupported() != null) ? other.isAsyncSupported() : false; boolean thisAsyncSupported = (asyncSupported != null) ? asyncSupported : false; boolean matchAsyncSupported = (thisAsyncSupported == otherAsyncSupported); return !(matchImplName && matchAsyncSupported); } }
implClassName = endpoint.getEjbComponentImpl().getEjbClassName(); } else { implClassName = endpoint.getWebComponentImpl().getWebComponentImplementation();
String implFile = webCompDesc.getWebComponentImplementation(); if (webComponentDescriptor.isConflict() && (implFile == null || implFile.length() == 0)) {
(WebComponentDescriptor)webComponents.next(); if (webCompDesc.isServlet()) { String servletName = webCompDesc.getWebComponentImplementation(); if (isScan(servletName, commonCL)) { addScanClassName(servletName);
setMultipartConfig(other.getMultipartConfig()); if (getWebComponentImplementation() == null) { setWebComponentImplementation( other.getWebComponentImplementation());
appendTextChild(myNode, WebTagNames.SERVLET_NAME, descriptor.getCanonicalName()); if (descriptor.isServlet()) { appendTextChild(myNode, WebTagNames.SERVLET_CLASS, descriptor.getWebComponentImplementation()); } else { appendTextChild(myNode, WebTagNames.JSP_FILENAME, descriptor.getWebComponentImplementation());
/** * The copy constructor. */ public WebComponentDescriptor(WebComponentDescriptor other) { setCanonicalName(other.getCanonicalName()); setServlet(other.isServlet()); setWebComponentImplementation( other.getWebComponentImplementation()); getInitializationParameterSet().addAll( other.getInitializationParameterSet()); getUrlPatternsSet().addAll(other.getUrlPatternsSet()); setLoadOnStartUp(other.getLoadOnStartUp()); getSecurityRoleReferenceSet().addAll( other.getSecurityRoleReferenceSet()); setRunAsIdentity(other.getRunAsIdentity()); setAsyncSupported(other.isAsyncSupported()); setMultipartConfig(other.getMultipartConfig()); setWebBundleDescriptor(other.getWebBundleDescriptor()); setConflict(other.isConflict()); }
String webCompImpl = webCompDesc.getWebComponentImplementation(); if (webCompImpl != null && webCompImpl.length() > 0 && (!webCompImpl.equals(webCompClass.getName()) || !webCompDesc.isServlet())) {