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
|
@ -1189,10 +1189,18 @@ public final class Application implements IPathElement, Runnable {
|
||||||
/**
|
/**
|
||||||
* Return the directory of this application
|
* Return the directory of this application
|
||||||
*/
|
*/
|
||||||
public File getAppDir() {
|
public File getAppDir() {
|
||||||
return appDir;
|
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
|
* Get the DbMapping associated with a prototype name in this application
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package helma.framework.core;
|
package helma.framework.core;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
@ -185,6 +186,16 @@ public class ApplicationBean implements Serializable {
|
||||||
return skinz;
|
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() {
|
public String toString() {
|
||||||
return "[Application " + app.getName() + "]";
|
return "[Application " + app.getName() + "]";
|
||||||
|
|
Loading…
Add table
Reference in a new issue