HQU Backend API
HQ's backend APIs are all available to HQU plugins and can be accessed in the same way as regular Java.
Using the backend APIs, any HQ function can be performed.
The majority of HQ's source can be found in the /src directory. See Also: Checkout out source via svn
The simplest way to understand how to use these APIs is to use other Groovy APIs as examples. In particular, examine ResourceHelper.groovy and existing HQU Plugins.
Managers and invoking the HQ backend
Managers in HQ typically are located in:
src/org/hyperic/hq/{subsystem}/server/session/SomeManagerEJBImpl.java
The EJBImpl.java trail tells us that it is a session bean which provides transactions and sessions. Invocation of a manager operation is simple:
import org.hyperic.hq.appdef.server.session.PlatformManagerEJBImpl as PlatMan
private getPlat10001() {
PlatMan.one.findPlatformById(10001)
}
Many of HQ's managers have a method getOne() which returns an instance of that session bean.