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); } }
if (!webCompDesc.isConflict(webComponentDescriptor, true)) { if (webComponentDescriptor.isConflict() && (implFile == null || implFile.length() == 0)) { if (webComponentDescriptor.isConflict()) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionconflictwebcomp",
@Override protected WebComponentDescriptor combineWebComponentDescriptor( WebComponentDescriptor webComponentDescriptor) { WebComponentDescriptor resultDesc = null; String name = webComponentDescriptor.getCanonicalName(); WebComponentDescriptor webCompDesc = getWebComponentByCanonicalName(name); if (webCompDesc != null) { resultDesc = webCompDesc; if (webCompDesc.isConflict(webComponentDescriptor, false)) { webCompDesc.setConflict(true); } else { // combine the contents of the given one to this one webCompDesc.add(webComponentDescriptor); } } else { resultDesc = webComponentDescriptor; this.getWebComponentDescriptors().add(webComponentDescriptor); } return resultDesc; }
/** * 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()); }