public abstract class VelocityReportPluginSupport extends Object implements ReportPlugin
Modifier and Type | Field and Description |
---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
protected DocumentFieldDao |
docFieldDao |
protected DocumentDao |
documentDao |
protected com.jamasoftware.contour.service.documentNode.DocumentNodeManager |
documentNodeManager |
protected com.jamasoftware.contour.service.DocumentTypeService |
documentTypeService |
protected com.jamasoftware.contour.util.type.FieldDataTypeManager |
fieldDataTypeManager |
protected com.jamasoftware.contour.search.service.FilterService |
filterService |
protected com.jamasoftware.contour.project.service.ProjectService |
projectService |
protected com.jamasoftware.contour.service.PropertyService |
propertyService |
protected com.jamasoftware.contour.service.RelationshipService |
relationshipService |
protected Report |
report |
protected com.jamasoftware.contour.util.ReportRender |
reportRender |
protected com.jamasoftware.contour.search.service.SmartFilterService |
smartFilterService |
protected TagDao |
tagDao |
protected UserDao |
userDao |
static String |
VELOCITY_REPORT_PARAM_RELATE |
static String |
VELOCITY_REPORT_PARAM_TAG |
Constructor and Description |
---|
VelocityReportPluginSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
addVelocityTools(Map<String,Object> model)
Adds the Velocity tools to the context model.
|
protected String |
getBaseUrl(Project project)
Returns base URL with a trailing slash ('/').
|
protected com.jamasoftware.contour.api.util.DateFormatter |
getDateFormatter()
Gets the system date formats.
|
protected SearchResults<ContourItem> |
getDocumentlist(QuickReportDTO quickReport) |
protected SearchResults<ContourItem> |
getDocumentlistSorted(QuickReportDTO quickReport,
String orderBy) |
protected com.jamasoftware.contour.api.service.dto.DocumentTypeDTO |
getDocumentMeta(QuickReportDTO quickReport,
Map<String,com.jamasoftware.contour.api.service.dto.DocumentTypeDTO> metaCache,
ContourItem document) |
Report |
getReport() |
protected abstract Map<String,Object> |
getVelocityReport(QuickReportDTO quickReport,
Integer projectId,
Map<String,Boolean> params,
String format,
Map<String,Object> reportParams)
Renders the report.
|
void |
init(Report report,
org.springframework.context.ApplicationContext applicationContext)
Initiates the daos and services used by the report.
|
protected void |
mergeRelationships(ArrayList<com.jamasoftware.contour.api.plugin.VelocityReportDTO> vrDtoArrayList,
List<Integer> ids) |
protected void |
mergeTags(ArrayList<com.jamasoftware.contour.api.plugin.VelocityReportDTO> vrDtoArrayList,
ArrayList<Integer> ids) |
Map<String,Object> |
runPlugin(Map<String,Object> params)
Runs a report plugin
|
public static final String VELOCITY_REPORT_PARAM_TAG
public static final String VELOCITY_REPORT_PARAM_RELATE
protected Report report
protected org.springframework.context.ApplicationContext applicationContext
protected com.jamasoftware.contour.util.ReportRender reportRender
protected com.jamasoftware.contour.project.service.ProjectService projectService
protected com.jamasoftware.contour.service.DocumentTypeService documentTypeService
protected com.jamasoftware.contour.search.service.FilterService filterService
protected com.jamasoftware.contour.search.service.SmartFilterService smartFilterService
protected com.jamasoftware.contour.service.RelationshipService relationshipService
protected TagDao tagDao
protected com.jamasoftware.contour.service.PropertyService propertyService
protected DocumentFieldDao docFieldDao
protected DocumentDao documentDao
protected UserDao userDao
protected com.jamasoftware.contour.util.type.FieldDataTypeManager fieldDataTypeManager
protected com.jamasoftware.contour.service.documentNode.DocumentNodeManager documentNodeManager
public void init(Report report, org.springframework.context.ApplicationContext applicationContext)
init
in interface ReportPlugin
report
- the underlying reportapplicationContext
- Spring contextpublic Map<String,Object> runPlugin(Map<String,Object> params) throws Exception
ReportPlugin
runPlugin
in interface ReportPlugin
params
- parameters for the reportException
protected abstract Map<String,Object> getVelocityReport(QuickReportDTO quickReport, Integer projectId, Map<String,Boolean> params, String format, Map<String,Object> reportParams) throws Exception
quickReport
- projectId
- params
- format
- reportParams
- Exception
protected com.jamasoftware.contour.api.util.DateFormatter getDateFormatter()
protected void addVelocityTools(Map<String,Object> model)
By default, mathTool
, sortTool
, dateTool
and escapeTool
are
added.
model
- protected void mergeTags(ArrayList<com.jamasoftware.contour.api.plugin.VelocityReportDTO> vrDtoArrayList, ArrayList<Integer> ids)
protected void mergeRelationships(ArrayList<com.jamasoftware.contour.api.plugin.VelocityReportDTO> vrDtoArrayList, List<Integer> ids)
protected com.jamasoftware.contour.api.service.dto.DocumentTypeDTO getDocumentMeta(QuickReportDTO quickReport, Map<String,com.jamasoftware.contour.api.service.dto.DocumentTypeDTO> metaCache, ContourItem document)
protected SearchResults<ContourItem> getDocumentlist(QuickReportDTO quickReport)
protected SearchResults<ContourItem> getDocumentlistSorted(QuickReportDTO quickReport, String orderBy)
public Report getReport()
getReport
in interface ReportPlugin
Copyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.