public EObject getStandardDeploymentDescriptor() { if (getModuleFile() == null) return null; return getModuleFile().getStandardDeploymentDescriptor(); }
/** * Retrieves the deployment descriptor root element for the specified module. Takes into account * altDD indirection. */ public EObject getDeploymentDescriptor(Module aModule) throws FileNotFoundException, ResourceLoadException, EmptyResourceException { EObject dd = getAltDeploymentDescriptor(aModule); if (dd == null) dd = getModuleFile(aModule).getStandardDeploymentDescriptor(); return dd; }
public ModuleFile copy(ModuleFile aModuleFile) { /** * Timing issue; if the resources containing the bindings, extensions, and dd have not yet * be loaded, force that before the copy occurs; otherwise, they will get loaded as the * accessors are invoked during copy. Because they will be loaded but not copied into the * new archive's context, then changes will not get saved. By forcing the load before the * copy commences, the loaded resources will also be copied to the new archive */ aModuleFile.getStandardDeploymentDescriptor(); /* * RLS-8/12/2002 Hack to fix botp defect "141640-failed to install .war file with * filter-mapping" The problem is that there is a transient field on the filter mapping * class for the servlet name the relationship to the servlet is lazily populated the first * time it is requested. If we don't trip it, then it won't get copied. */ if (aModuleFile.isWARFile()) { List filterMappings = ((WARFile) aModuleFile).getDeploymentDescriptor().getFilterMappings(); for (int i = 0; i < filterMappings.size(); i++) { ((FilterMapping) filterMappings.get(i)).getServlet(); } } ModuleFile copied = (ModuleFile) copy((Archive) aModuleFile); return copied; }
protected void validatateXml() { ByteArrayOutputStream bos = new ByteArrayOutputStream(); Resource res = archive.getStandardDeploymentDescriptor().eResource(); XmlValidationResult result = new XmlValidationResult(); result.setArchive(archive);