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); } }
/** * visit a web component descriptor * * @param descriptor the web component */ public void accept(WebComponentDescriptor descriptor) { //set default value if (descriptor.getLoadOnStartUp() == null) { descriptor.setLoadOnStartUp(-1); } if (descriptor.isAsyncSupported() == null) { descriptor.setAsyncSupported(false); } MultipartConfig multipartConfig = descriptor.getMultipartConfig(); if (multipartConfig != null) { if (multipartConfig.getMaxFileSize() == null) { multipartConfig.setMaxFileSize(new Long(-1)); } if (multipartConfig.getMaxRequestSize() == null) { multipartConfig.setMaxRequestSize(new Long(-1)); } if (multipartConfig.getFileSizeThreshold() == null) { multipartConfig.setFileSizeThreshold(new Integer(0)); } } computeRuntimeDefault(descriptor); }
setLoadOnStartUp(other.getLoadOnStartUp()); if (isAsyncSupported() == null) { setAsyncSupported(other.isAsyncSupported());
/** * 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()); }
if (webCompDesc.isAsyncSupported() == null) { webCompDesc.setAsyncSupported(webServletAn.asyncSupported());
appendTextChild(myNode, WebTagNames.ASYNC_SUPPORTED, String.valueOf(descriptor.isAsyncSupported()));
wrapper.setLoadOnStartup(webComponentDesc.getLoadOnStartUp()); if (webComponentDesc.isAsyncSupported() != null) { wrapper.setIsAsyncSupported(webComponentDesc.isAsyncSupported());