DeploymentFileData represents a "thing to deploy" in Axis2. It consists of a file,
a deployment ClassLoader, and a Deployer.
| Method from org.apache.axis2.deployment.repository.util.DeploymentFileData Detail: |
public void deploy() throws DeploymentException {
deployer.deploy(this);
}
|
public String getAbsolutePath() {
return file.getAbsolutePath();
}
|
public ClassLoader getClassLoader() {
return classLoader;
}
|
public Deployer getDeployer() {
return deployer;
}
|
public File getFile() {
return file;
}
|
public static String getFileExtension(String fileName) {
int index = fileName.lastIndexOf('.");
return fileName.substring(index + 1);
}
|
public String getName() {
return file.getName(); // No need to check for null due to constructor check
}
Get the name of the file. |
public String getServiceName() {
return getName();
} Deprecated! please - use getName() instead - this will disappear after 1.3.
Get the name of the file. |
public static boolean isModuleArchiveFile(String filename) {
return (filename.endsWith(".mar"));
}
|
public static boolean isServiceArchiveFile(String filename) {
return ((filename.endsWith(".jar")) | (filename.endsWith(".aar")));
}
Checks whether a given file is a jar or an aar file. |
public void setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
|
public void setClassLoader(boolean isDirectory,
ClassLoader parent,
File file) throws AxisFault {
if (!isDirectory) {
if (this.file != null) {
URL[] urlsToLoadFrom;
try {
if (!this.file.exists()) {
throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND,
this.file.getAbsolutePath()));
}
urlsToLoadFrom = new URL[]{this.file.toURL()};
classLoader = Utils.createClassLoader(urlsToLoadFrom, parent, true, file);
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
}
} else {
if (this.file != null) {
classLoader = Utils.getClassLoader(parent, this.file);
}
}
}
|
public void setDeployer(Deployer deployer) {
this.deployer = deployer;
}
|