Report templates are HTML files with Velocity template language (VTL) statements embedded. Velocity statements look like #set( $var = value ), or #if ( $var >= 34 ). Velocity falls under the Apache organization. For more information, visit velocity.apache.org.
The Velocity template language provides access to key RiskVision solution objects, including those described below. For examples of Dashboard Templates, see Creating an Advanced Report Template.
$dashboardContext
void
bindSavedParameterValues()
Dashboard
getDashboard()
DashboardParameters
getDashboardParameters()
void
initReports(
List<String> report URIs)
A dashboard template must call initReports if the dashboard has dependent reports.
void
loadObject(
String className)
boolean
isPreprocessing()
boolean
isRendering() – true if not preprocessing
void
saveParameters()
void
setDashboardParameters(
Map<String,
String> parms,
Map<String,
String> reportParms)
void
setParameter(
String key,
[ String logicalReportId, - optional
String pname ] - optional
Object val)
void
setPreprocessing(
boolean value)
void
setRendering(
boolean value)
$dashboardParameters
void
addDashboardReport(
String URL,
FusionReport report,
DashboardContext context)
DashboardParameterInstance
addParameter(
String name,
String label
[ String type ] - optional
[ boolean isList ] - optional
[ String filter ] - optional
)
Types are: String, Number, Date, Timestamp, Entity, Control, Subcontrol, Program, Vulnerability, Ticket, or DynamicGroup.
Entity
getEntity(
String key,
String displayName)
List<Entity>
getEntities(
String key,
String displayName)
PolicySet
getControl(
String key,
String displayName)
List<PolicySet>
getControls(
String key,
String displayName)
DashboardReport
getDashboardReport(
String URL)
Date
getDate(
String key,
String displayName)
String
getDateStr(
String key,
String displayName)
VirtualGroupInstance
getDynamicGroup(
String key,
String displayName)
List<VirtualGroupInstance>
getDynamicGroups(
String key,
String displayName)
Object
getParameterValue(
String name)
AuditProject
getProject(
String key,
String displayName
[, filter] - optional
)
List<AuditProject>
getProjects(
String key,
String displayName
[, filter] - optional
)
DashboardReport
getReport(
String id)
String
getReport(
String URL,
String size
[, String logicalReportId] - optional
)
String
getReportLookupKey(
String URL,
String logicalReportId)
DashboardReport
getReportByUrlandLogicalReportId(
String URL,
String logicalReportId)
Policy
getSubcontrol(
String key,
String displayName)
List<Policy>
getSubcontrols(
String key,
String displayName)
Ticket
getTicket(
String key,
String displayName)
List<Ticket>
getTickets(
String key,
String displayName)
String
getTimestamp(
String key,
String displayName)
Vulnerability
getVulnerability(
String key,
String displayName)
List<Vulnerability>
getVulnerabilities(
String key,
String displayName)
void
setControl(
String URL,
String key,
[String logicalReportId,] - optional
PolicySet value)
void
setVulnerability(
String URL,
String key,
[String logicalReportId,] - optional
Vulnerability value)
$dashboardProcessor
String
getAbortOnFirstReportError()
DashboardContext
getDashboardContext()
int
getMaxRows()
FusionReport
getReport(
String reportURI)
List<List<?>>
getReportData(
String reportURI,
Map<String,
String> parms,
Integer maxRows)
void
setMaxRows(
int max)
void
setAbortOnFirstReportError(
String actionOnReportError)
Other Objects
Other system objects can be requested using the dashboard methods described here, including:
- Entity (that is, entity)
- AuditProject (that is, assessment program)
- DashboardReport
- Object
- Policy
- PolicySet
- Ticket
- VirtualGroupInstance (that is, dynamic group)
- Vulnerability
These objects typically have a.getTitle() method and a.getDescription() method which provide sufficient information about the object for dashboard purposes.