protected static ModuleFile getModuleFileUsingAltDD(EARFile ear, Resource res) { if (res == null) return null; String uri = res.getURI().toString(); Module m = ear.getDeploymentDescriptor().getModuleHavingAltDD(uri); if (m == null) return null; ModuleRef ref = ear.getModuleRef(m); if (ref == null) return null; return ref.getModuleFile(); }
protected static ModuleFile getModuleFileUsingAltDD(EARFile ear, Resource res) { if (res == null) return null; String uri = res.getURI().toString(); Module m = ear.getDeploymentDescriptor().getModuleHavingAltDD(uri); if (m == null) return null; ModuleRef ref = ear.getModuleRef(m); if (ref == null) return null; return ref.getModuleFile(); }
public EObject getDeploymentDescriptor() throws ArchiveWrappedException { if (getEarFile() == null) return getStandardDeploymentDescriptor(); try { return getEarFile().getDeploymentDescriptor(getModule()); } catch (Exception ex) { throw new ArchiveWrappedException(ex); } }
/** * validateSecurity(WebApp) - validate security constraints, roles, and security role refs - * details tbd */ public void validateSecurityAndServlets() { EList webRoles = webDD.getSecurityRoles(); // Validate security roles Hashtable secRoles = getAndValidateSecurityRoles(webRoles); // Validate Servlets/JSPs and their role ref. validateServlets(webDD.getServlets(), secRoles); validateSecurityConstraints(webDD.getConstraints(), secRoles); // try { if (!(webRoles.isEmpty())) { EARFile module = warFile.getEARFile(); if (module != null) { EList earRoleList = module.getDeploymentDescriptor().getSecurityRoles(); validateWEBRolesWithEARRoles(earRoleList, webRoles); } } // } catch (UncontainedModuleFileException ue) { // String[] parms = new String[1]; // parms[0] = warFile.getName(); // addError(EREF_CATEGORY, ERROR_EAR_UNCONTAINED_MODULE_FILE_EXCEPTION, parms); // } }
earFile = (EARFile) _helper.loadModel(J2EEConstants.EAR_MODEL_NAME); if (earFile != null) { appDD = earFile.getDeploymentDescriptor(); if (appDD != null && appDD.eResource() != null && appDD.eResource().isLoaded()) validate();
} else if (anArchive.isEARFile()) { archiveType = EARFILE; Application app = ((EARFile) anArchive).getDeploymentDescriptor(); if (app.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID) archiveType |= J2EE12;