Add public getters for application and server directory
This commit is contained in:
parent
050438c80a
commit
c07fc06de4
2 changed files with 20 additions and 1 deletions
|
@ -1193,6 +1193,14 @@ public final class Application implements IPathElement, Runnable {
|
|||
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
|
||||
*/
|
||||
|
|
|
@ -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() + "]";
|
||||
|
|
Loading…
Add table
Reference in a new issue