public DeploymentHelper(URLInfo urlInfo,
String j2eeDDName,
String geronimoDDName,
String infDir) throws DeploymentException {
this.url = urlInfo.getUrl();
this.urlType = urlInfo.getType();
try {
if (URLType.RESOURCE == urlType) {
j2eeURL = null;
geronimoURL = url;
} else if (URLType.PACKED_ARCHIVE == urlType) {
j2eeURL = new URL("jar:" + this.url.toExternalForm() + "!/" + infDir + "/" + j2eeDDName);
geronimoURL = new URL("jar:" + this.url.toExternalForm() + "!/" + infDir + "/" + geronimoDDName);
} else if (URLType.UNPACKED_ARCHIVE == urlType) {
j2eeURL = new URL(this.url, infDir + "/" + j2eeDDName);
geronimoURL = new URL(this.url, infDir + "/" + geronimoDDName);
} else {
j2eeURL = null;
geronimoURL = null;
return;
}
} catch (MalformedURLException e1) {
throw new DeploymentException("Should never occur", e1);
}
}
Creates an helper related to the specified deployment URL. Parameters:
urlInfo - Deployment URLInfo.
j2eeDDName - name of the J2EE deployment descriptor file
geronimoDDName - name of the Geronimo deployment descriptor file
infDir - the directory where deployment descriptors are to be looked up
Throws:
DeploymentException - when the deployment doesn't exist
|