Getting Data from Java Objects

Most of the time, you can obtain all data for a dashboard from reports, which is the preferred way of getting data. You can even define custom reports through the RiskVision solution.

By default, the Java object $dashboardToolbox is loaded into the dashboard context. Contact <a href="https://support.agiliance.com">Agiliance Customer Support</a> for a complete list of methods available from this object.

In order to get data from other Java objects, the objects must be loaded into the dashboard context using $dashboardContext.loadObject(). This method requires two arguments, namely, the object name and the class name. In the example below, the object name is vulnerabilityUtil and the class name is com..web.utils.VulnerabilityUtil.

$dashboardContext.loadObject('vulnerabilityUtil', 'com..web.utils.VulnerabilityUtil')

Once this object is loaded, you can call any of its public methods. For example, the two lines below get the top 20 vulnerabilities that have been found on all entities in the system:

 #set($maxRows = 20)

 #set($topVulnerabilities = $vulnerabilityUtil.getTopVulnerabilitiesForAllEntities($maxRows))

Consult <a href="https://support.agiliance.com">Agiliance Customer Support</a> for Java objects available for this purpose.