Since an app's documentation/introspection depends on its scripting language ,
the task of getting the documentation/introspection object used by the management app is now delegated to the app's scripting engine.
This commit is contained in:
parent
d864dc37fe
commit
c0b8abaa0b
1 changed files with 4 additions and 16 deletions
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
package helma.framework.core;
|
package helma.framework.core;
|
||||||
|
|
||||||
import helma.doc.DocApplication;
|
|
||||||
import helma.doc.DocException;
|
|
||||||
import helma.extensions.HelmaExtension;
|
import helma.extensions.HelmaExtension;
|
||||||
import helma.extensions.ConfigurationException;
|
import helma.extensions.ConfigurationException;
|
||||||
import helma.framework.*;
|
import helma.framework.*;
|
||||||
|
@ -111,9 +109,7 @@ public final class Application implements IPathElement, Runnable {
|
||||||
// Map of extensions allowed for public skins
|
// Map of extensions allowed for public skins
|
||||||
Properties skinExtensions;
|
Properties skinExtensions;
|
||||||
|
|
||||||
// DocApplication used for introspection
|
// time we last read the properties file
|
||||||
public DocApplication docApp;
|
|
||||||
|
|
||||||
private long lastPropertyRead = 0l;
|
private long lastPropertyRead = 0l;
|
||||||
|
|
||||||
// the set of prototype/function pairs which are allowed to be called via XML-RPC
|
// the set of prototype/function pairs which are allowed to be called via XML-RPC
|
||||||
|
@ -1007,15 +1003,7 @@ public final class Application implements IPathElement, Runnable {
|
||||||
// the first time an url like /appname/api/ is parsed, the application is read again
|
// the first time an url like /appname/api/ is parsed, the application is read again
|
||||||
// parsed for comments and exposed as an IPathElement
|
// parsed for comments and exposed as an IPathElement
|
||||||
if (name.equals("api")) {
|
if (name.equals("api")) {
|
||||||
if ( docApp==null ) {
|
return eval.scriptingEngine.getIntrospector ();
|
||||||
try {
|
|
||||||
docApp = new DocApplication (this.name, appDir.toString());
|
|
||||||
docApp.readApplication ();
|
|
||||||
} catch ( DocException e ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return docApp;
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue