/** * @see com.ibm.etools.commonarchive.EARFile */ public Module getModule(String aUri, String altDD) { return getDeploymentDescriptor().getModule(aUri, altDD); }
/** * This method will set the context root on the application for the passed in contextRoot. This * must be called in a write artifact edit and be saved for changes to be saved. * * @param webProject * @param aContextRoot */ public void setWebContextRoot(IProject webProject, String aContextRoot) { verifyOperationSupported(); if (webProject == null || !J2EEProjectUtilities.isDynamicWebProject(webProject)) return; IVirtualComponent webComp = ComponentCore.createComponent(webProject); String webModuleURI = getModuleURI(webComp); if (webModuleURI != null) { WebModule webModule = (WebModule) getApplication().getModule(webModuleURI, null); if (webModule != null) webModule.setContextRoot(aContextRoot); } } public IModelProvider create(IProject project) {
/** * This method will return the context root in this application for the passed in web project. * * @param webProject * @return contextRoot String */ public String getWebContextRoot(IProject webProject) { verifyOperationSupported(); if (webProject == null || !J2EEProjectUtilities.isDynamicWebProject(webProject)) return null; IVirtualComponent webComp = ComponentCore.createComponent(webProject); String webModuleURI = getModuleURI(webComp); if (webModuleURI != null) { WebModule webModule = (WebModule) getApplication().getModule(webModuleURI, null); if (webModule != null) return webModule.getContextRoot(); } return null; }