This commit was generated by cvs2svn to compensate for changes in r2155,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
parent
72d15e11ab
commit
4a7616d5a0
51 changed files with 1885 additions and 0 deletions
36
Root/functions.js
Normal file
36
Root/functions.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
/**
|
||||
* lists all applications in appdir.
|
||||
* for active apps use this.getApplications() = helma.main.Server.getApplications()
|
||||
*/
|
||||
function getAllApplications() {
|
||||
var appsDir = this.getAppsHome();
|
||||
var dir = appsDir.list();
|
||||
var arr = new Array();
|
||||
for ( var i=0; i<dir.length; i++ ) {
|
||||
if ( dir[i].toLowerCase()!="cvs" && dir[i].indexOf(".")==-1 )
|
||||
arr[arr.length] = this.getApp(dir[i]);
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get application by name, constructs an hopobject of the prototype application
|
||||
* if the app is not running (and therefore can't be access through
|
||||
* helma.main.ApplicationManager).
|
||||
* ATTENTION: javascript should not overwrite helma.main.Server.getApplication() which
|
||||
* retrieves active applications.
|
||||
* @arg name of application
|
||||
*/
|
||||
function getApp(name) {
|
||||
if ( name==null || name=="" )
|
||||
return null;
|
||||
var appObj = this.getApplication(name);
|
||||
if ( appObj==null )
|
||||
appObj = new application(name);
|
||||
return appObj;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue