Add public getters for application and server directory

This commit is contained in:
hns 2002-11-26 17:43:24 +00:00
parent 050438c80a
commit c07fc06de4
2 changed files with 20 additions and 1 deletions

View file

@ -1189,10 +1189,18 @@ public final class Application implements IPathElement, Runnable {
/**
* Return the directory of this application
*/
public File getAppDir() {
public File getAppDir() {
return appDir;
}
/**
* Return the directory of the Helma server
*/
public File getServerDir() {
return home;
}
/**
* Get the DbMapping associated with a prototype name in this application
*/

View file

@ -1,6 +1,7 @@
package helma.framework.core;
import java.io.Serializable;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.Enumeration;
@ -185,6 +186,16 @@ public class ApplicationBean implements Serializable {
return skinz;
}
public String getAppDir () {
return app.getAppDir().getAbsolutePath();
}
public String getServerDir () {
File f = app.getServerDir();
if (f == null)
f = app.getAppDir();
return f.getAbsolutePath();
}
public String toString() {
return "[Application " + app.getName() + "]";