public class BusinessObjectReportHelper extends Object
ReportWriterTextServiceImpl
Modifier and Type | Field and Description |
---|---|
protected Class<? extends org.kuali.rice.krad.bo.BusinessObject> |
dataDictionaryBusinessObjectClass |
protected org.kuali.rice.kns.service.DataDictionaryService |
dataDictionaryService |
static String |
LEFT_ALIGNMENT |
static String |
LINE_BREAK |
protected String |
messageLabel |
protected int |
minimumMessageLength |
protected Map<String,String> |
orderedPropertyNameToHeaderLabelMap |
static String |
RIGHT_ALIGNMENT |
Constructor and Description |
---|
BusinessObjectReportHelper() |
Modifier and Type | Method and Description |
---|---|
void |
applyColspanOnCellValues(List<String> cellValues)
apply the colspan definition on the default values of the table cells.
|
void |
applyColspanOnCellWidth(List<Integer> cellWidthList)
apply the colspan definition on the default width of the table cells
|
List<Object> |
getBlankValues(org.kuali.rice.krad.bo.BusinessObject businessObject)
Same as getValues except that it actually doesn't retrieve the values from the BO but instead returns a blank linke.
|
protected List<Class<? extends org.kuali.rice.core.web.format.Formatter>> |
getNumberFormatters()
get formatter classes defined for numbers
|
String |
getSepartorLine(List<Integer> cellWidthList)
get the separator line
|
List<String> |
getTableCellAlignment()
get the alignment definitions of all table cells in one row according to the property's formatter class
|
String |
getTableCellFormat(boolean allowColspan,
boolean allowRightAlignment,
String separatorLine)
get the format string for all cells in a table row.
|
List<String> |
getTableCellValues(org.kuali.rice.krad.bo.BusinessObject businessObject,
boolean allowColspan)
Returns the values in a list of the passed in business object in order of the spring definition.
|
List<String> |
getTableCellValuesPaddingWithEmptyCell(org.kuali.rice.krad.bo.BusinessObject businessObject,
boolean allowColspan)
get the values that can be fed into a predefined table.
|
List<Integer> |
getTableCellWidth()
get the width of all table cells according to the definition
|
Map<String,String> |
getTableDefinition()
get the primary information that can define a table structure
|
List<String> |
getTableHeader(int maximumPageWidth)
Returns multiple lines of what represent a table header.
|
List<Object> |
getValues(org.kuali.rice.krad.bo.BusinessObject businessObject)
Returns the values in a list of the passed in business object in order of the spring definition.
|
protected void |
paddingTableCellValues(int numberOfCell,
List<String> tableCellValues) |
protected Class<? extends org.kuali.rice.core.web.format.Formatter> |
retrievePropertyFormatterClass(Class<? extends org.kuali.rice.krad.bo.BusinessObject> businessObjectClass,
String propertyName)
Returns the maximum length of a value for a given propery, can be overridden to allow for pseudo-properties
|
protected Object |
retrievePropertyValue(org.kuali.rice.krad.bo.BusinessObject businessObject,
String propertyName)
Returns a value for a given property, can be overridden to allow for pseudo-properties
|
protected int |
retrievePropertyValueMaximumLength(Class<? extends org.kuali.rice.krad.bo.BusinessObject> businessObjectClass,
String propertyName)
Returns the maximum length of a value for a given propery, can be overridden to allow for pseudo-properties
|
void |
setColumnCount(int columnCount)
Sets the columnCount attribute value.
|
void |
setColumnSpanDefinition(Map<String,Integer> columnSpanDefinition)
Sets the columnSpanDefinition attribute value.
|
void |
setDataDictionaryBusinessObjectClass(Class<? extends org.kuali.rice.krad.bo.BusinessObject> dataDictionaryBusinessObjectClass)
Sets the dataDictionaryBusinessObjectClass
|
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService
|
void |
setMessageLabel(String messageLabel)
Sets the messageLabel
|
void |
setMinimumMessageLength(int minimumMessageLength)
Sets the minimumMessageLength
|
void |
setOrderedPropertyNameToHeaderLabelMap(Map<String,String> orderedPropertyNameToHeaderLabelMap)
Sets the orderedPropertyNameToHeaderLabelMap
|
protected int minimumMessageLength
protected String messageLabel
protected Class<? extends org.kuali.rice.krad.bo.BusinessObject> dataDictionaryBusinessObjectClass
protected Map<String,String> orderedPropertyNameToHeaderLabelMap
protected org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService
public static final String LEFT_ALIGNMENT
public static final String RIGHT_ALIGNMENT
public static final String LINE_BREAK
public BusinessObjectReportHelper()
public List<Object> getValues(org.kuali.rice.krad.bo.BusinessObject businessObject)
businessObject
- for which to return the valuesprotected Object retrievePropertyValue(org.kuali.rice.krad.bo.BusinessObject businessObject, String propertyName)
businessObject
- propertyName
- protected int retrievePropertyValueMaximumLength(Class<? extends org.kuali.rice.krad.bo.BusinessObject> businessObjectClass, String propertyName)
businessObjectClass
- propertyName
- protected Class<? extends org.kuali.rice.core.web.format.Formatter> retrievePropertyFormatterClass(Class<? extends org.kuali.rice.krad.bo.BusinessObject> businessObjectClass, String propertyName)
businessObjectClass
- propertyName
- public List<Object> getBlankValues(org.kuali.rice.krad.bo.BusinessObject businessObject)
businessObject
- for which to return the valuespublic List<String> getTableHeader(int maximumPageWidth)
maximumPageWidth
- maximum before line is out of bounds. Used to fill message to the end of this range. Note that if
there isn't at least maximumPageWidth characters available it will go minimumMessageLength out of bounds. It is up to
the calling class to handle thatpublic Map<String,String> getTableDefinition()
public List<String> getTableCellValues(org.kuali.rice.krad.bo.BusinessObject businessObject, boolean allowColspan)
businessObject
- for which to return the valuesallowColspan
- indicate whether colspan definition can be appliedpublic String getTableCellFormat(boolean allowColspan, boolean allowRightAlignment, String separatorLine)
allowColspan
- indicate whether colspan definition can be appliedallowRightAlignment
- indicate whether the right alignment can be appliedseparatorLine
- the separation line for better lookpublic String getSepartorLine(List<Integer> cellWidthList)
cellWidthList
- the given cell width listpublic void applyColspanOnCellWidth(List<Integer> cellWidthList)
the
- default width of the table cellspublic void applyColspanOnCellValues(List<String> cellValues)
the
- default values of the table cellspublic List<String> getTableCellValuesPaddingWithEmptyCell(org.kuali.rice.krad.bo.BusinessObject businessObject, boolean allowColspan)
businessObject
- the given business object whose property values will be collectedallowColspan
- indicate whether colspan definition can be appliedpublic List<Integer> getTableCellWidth()
public List<String> getTableCellAlignment()
protected void paddingTableCellValues(int numberOfCell, List<String> tableCellValues)
protected List<Class<? extends org.kuali.rice.core.web.format.Formatter>> getNumberFormatters()
public void setMinimumMessageLength(int minimumMessageLength)
minimumMessageLength
- The minimumMessageLength to set.public void setMessageLabel(String messageLabel)
messageLabel
- The messageLabel to set.public void setDataDictionaryBusinessObjectClass(Class<? extends org.kuali.rice.krad.bo.BusinessObject> dataDictionaryBusinessObjectClass)
dataDictionaryBusinessObjectClass
- The dataDictionaryBusinessObjectClass to set.public void setOrderedPropertyNameToHeaderLabelMap(Map<String,String> orderedPropertyNameToHeaderLabelMap)
orderedPropertyNameToHeaderLabelMap
- The orderedPropertyNameToHeaderLabelMap to set.public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
dataDictionaryService
- The dataDictionaryService to set.public void setColumnCount(int columnCount)
columnCount
- The columnCount to set.public void setColumnSpanDefinition(Map<String,Integer> columnSpanDefinition)
columnSpanDefinition
- The columnSpanDefinition to set.Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.