* Implement app.getPrototypes() and app.getPrototype(name) to allow app introspection.
This commit is contained in:
parent
ef0176fec0
commit
613344a006
1 changed files with 19 additions and 0 deletions
|
@ -419,6 +419,25 @@ public class ApplicationBean implements Serializable {
|
||||||
return app.getDbSource(name);
|
return app.getDbSource(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an array of this app's prototypes
|
||||||
|
*
|
||||||
|
* @return an array containing the app's prototypes
|
||||||
|
*/
|
||||||
|
public Prototype[] getPrototypes() {
|
||||||
|
return (Prototype[]) app.getPrototypes().toArray(new Prototype[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a prototype by name.
|
||||||
|
*
|
||||||
|
* @param name the prototype name
|
||||||
|
* @return the prototype
|
||||||
|
*/
|
||||||
|
public Prototype getPrototype(String name) {
|
||||||
|
return app.getPrototypeByName(name);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue