public class VelocityReportUtil extends Object
Constructor and Description |
---|
VelocityReportUtil(com.jamasoftware.contour.util.type.FieldDataTypeManager fieldDataTypeManager) |
Modifier and Type | Method and Description |
---|---|
String |
cleanText(String html)
This method will go through the provided text cleaning out unnecessary
syntax.
|
static Map<String,Object> |
convertStringParamsToReportParams(Map<String,String> map,
HttpSession session) |
String |
encodeTextForHTML(String str)
This method will search through the provided text looking for html/xml
tags and replacing them with the ascii equivalent.
|
String |
fromHtmlToRawText(String orig) |
String |
getValueForField(ContourItem doc,
com.jamasoftware.contour.api.service.dto.DocumentTypeDTO documentType,
String fieldName,
com.jamasoftware.contour.api.util.DateFormatter dateFormat)
Gets string value for the given field.
|
String |
getValueForField(ContourItem doc,
com.jamasoftware.contour.api.service.dto.DocumentTypeDTO documentType,
String fieldName,
com.jamasoftware.contour.api.util.DateFormatter dateFormat,
boolean exportToExcel)
Gets string value for the given field.
|
String |
getValueForField(ContourItem doc,
com.jamasoftware.contour.api.service.dto.DocumentTypeFieldDTO fieldDTO,
com.jamasoftware.contour.api.util.DateFormatter dateFormat)
Gets string value for the given field.
|
String |
getValueForField(ContourItem doc,
com.jamasoftware.contour.api.service.dto.DocumentTypeFieldDTO fieldDTO,
com.jamasoftware.contour.api.util.DateFormatter dateFormat,
boolean exportToExcel)
Gets string value for the given field.
|
String |
getValueForField(ContourItem doc,
String fieldName,
com.jamasoftware.contour.api.util.DateFormatter dateFormat) |
String |
replaceBreakForExcel(String str)
This will search through the provided text looking for HTML breaks and
Word style breaks and replace them with a simple line break so that the
output to Excel.
|
String |
replaceMSCharacters(String orig,
boolean keepNewLines)
This will replace all Microsoft special characters.
|
public VelocityReportUtil(com.jamasoftware.contour.util.type.FieldDataTypeManager fieldDataTypeManager)
public String getValueForField(ContourItem doc, com.jamasoftware.contour.api.service.dto.DocumentTypeDTO documentType, String fieldName, com.jamasoftware.contour.api.util.DateFormatter dateFormat)
doc
- documentdocumentType
- document type for the documentfieldName
- name of the field (not the label)dateFormat
- date formatterpublic String getValueForField(ContourItem doc, com.jamasoftware.contour.api.service.dto.DocumentTypeDTO documentType, String fieldName, com.jamasoftware.contour.api.util.DateFormatter dateFormat, boolean exportToExcel)
doc
- documentdocumentType
- document type for the documentfieldName
- name of the field (not the label)dateFormat
- date formatterexportToExcel
- whether to export to Excel or not. If export to
Excel, the HTML tags will be escaped.public String getValueForField(ContourItem doc, com.jamasoftware.contour.api.service.dto.DocumentTypeFieldDTO fieldDTO, com.jamasoftware.contour.api.util.DateFormatter dateFormat)
doc
- documentfieldDTO
- field definitiondateFormat
- date formatterpublic String getValueForField(ContourItem doc, com.jamasoftware.contour.api.service.dto.DocumentTypeFieldDTO fieldDTO, com.jamasoftware.contour.api.util.DateFormatter dateFormat, boolean exportToExcel)
doc
- documentfieldDTO
- field definitiondateFormat
- date formatterexportToExcel
- whether to export to Excel or not. If export to
Excel, the HTML tags will be escaped.public String getValueForField(ContourItem doc, String fieldName, com.jamasoftware.contour.api.util.DateFormatter dateFormat)
public String replaceBreakForExcel(String str)
str
- public String encodeTextForHTML(String str)
str
- public String cleanText(String html)
html
- public String replaceMSCharacters(String orig, boolean keepNewLines)
orig
- keepNewLines
- Copyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.