|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.report.BusinessObjectReportHelper
public class BusinessObjectReportHelper
Helper class for business objects to assist formatting them for error reporting. Utilizes spring injection for modularization and configurability
ReportWriterTextServiceImpl
Field Summary | |
---|---|
protected Class<? extends org.kuali.rice.kns.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 Summary | |
---|---|
BusinessObjectReportHelper()
|
Method Summary | |
---|---|
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.kns.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.kns.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.kns.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.kns.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.kns.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.kns.web.format.Formatter> |
retrievePropertyFormatterClass(Class<? extends org.kuali.rice.kns.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.kns.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.kns.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.kns.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int minimumMessageLength
protected String messageLabel
protected Class<? extends org.kuali.rice.kns.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
Constructor Detail |
---|
public BusinessObjectReportHelper()
Method Detail |
---|
public List<Object> getValues(org.kuali.rice.kns.bo.BusinessObject businessObject)
businessObject
- for which to return the values
protected Object retrievePropertyValue(org.kuali.rice.kns.bo.BusinessObject businessObject, String propertyName)
businessObject
- propertyName
-
protected int retrievePropertyValueMaximumLength(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, String propertyName)
businessObjectClass
- propertyName
-
protected Class<? extends org.kuali.rice.kns.web.format.Formatter> retrievePropertyFormatterClass(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, String propertyName)
businessObjectClass
- propertyName
-
public List<Object> getBlankValues(org.kuali.rice.kns.bo.BusinessObject businessObject)
businessObject
- for which to return the values
public 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 that
public Map<String,String> getTableDefinition()
public List<String> getTableCellValues(org.kuali.rice.kns.bo.BusinessObject businessObject, boolean allowColspan)
businessObject
- for which to return the valuesallowColspan
- indicate whether colspan definition can be applied
public 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 look
public String getSepartorLine(List<Integer> cellWidthList)
cellWidthList
- the given cell width list
public 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.kns.bo.BusinessObject businessObject, boolean allowColspan)
businessObject
- the given business object whose property values will be collectedallowColspan
- indicate whether colspan definition can be applied
public List<Integer> getTableCellWidth()
public List<String> getTableCellAlignment()
protected void paddingTableCellValues(int numberOfCell, List<String> tableCellValues)
protected List<Class<? extends org.kuali.rice.kns.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.kns.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |