added function renderApi(appName) which can be used from commandline

This commit is contained in:
stefanp 2004-01-06 15:55:39 +00:00
parent 66e35b7704
commit e8e2c7098a

View file

@ -1,10 +1,26 @@
/**
* of no use, just to avoid error message
* renders the api of a given application. used from commandline.
*/
function onRequest () {
function renderApi(appName) {
// supress security checks when accessing actions
res.data.noWeb = true;
// start the application
this.startApplication(appName);
var appObj = this.getApp(appName);
var docApp = appObj.getChildElement("api");
// now render the api
var ct = docApp.renderApi();
writeln("rendered " + ct + " files");
// cleanup
this.stopApplication(appName);
}
/**
* lists all applications in appdir.
* for active apps use this.getApplications() = helma.main.Server.getApplications()