public EObject getPrimaryRootObject() { return ((WARFile) getArchive()).getDeploymentDescriptor(); }
/** * This validator can be used for validation when the reporter and helper have been supplied via * the constructor. */ public void validate(Object aWarFile) throws ValidationException { try { warFile = (WARFile) aWarFile; webDD = warFile.getDeploymentDescriptor(); validate(); } catch (Exception e) { e.printStackTrace(); String[] parms = new String[1]; parms[0] = e.toString(); IMessage errorMsg = new Message(getBaseName(), IMessage.HIGH_SEVERITY, ERROR_WAR_VALIDATION_FAILED, parms); throw new ValidationException(errorMsg); } }
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; }
webDD = warFile.getDeploymentDescriptor(); validate(); } else {
boolean isVersion22 = warFile.getDeploymentDescriptor().getVersionID() <= J2EEVersionConstants.WEB_2_2_ID;
} else if (anArchive.isWARFile()) { archiveType = WARFILE; WebApp war = ((WARFile) anArchive).getDeploymentDescriptor(); if (war.getVersionID() == J2EEVersionConstants.WEB_2_2_ID) archiveType |= J2EE12;