public class TableExporter extends Object
Constructor and Description |
---|
TableExporter() |
Modifier and Type | Method and Description |
---|---|
static String |
buildExportTableData(CollectionGroup collectionGroup,
Object model,
String formatType)
Generates formatted table data based on the posted view results and format type.
|
protected static String |
buildExportTableRow(List<String> columnData,
Map<String,String> tableFormatOptions,
List<Integer> ignoredColumns)
Helper method used to build formatted table row data for export.
|
protected static List<Integer> |
findIgnoredColumns(TableLayoutManager layoutManager,
CollectionGroup collectionGroup)
Helper function to determine whether if column should be displayed.
|
protected static Map<String,String> |
getExportTableFormatOptions(String formatType)
Identify table formatting elements based on formatType.
|
public TableExporter()
public static String buildExportTableData(CollectionGroup collectionGroup, Object model, String formatType)
collectionGroup
- collection group instance that should be exportedmodel
- top level object containing the dataformatType
- format which the table should be generated inprotected static List<Integer> findIgnoredColumns(TableLayoutManager layoutManager, CollectionGroup collectionGroup)
layoutManager
- The layout manager.collectionGroup
- The collection group.protected static String buildExportTableRow(List<String> columnData, Map<String,String> tableFormatOptions, List<Integer> ignoredColumns)
columnData
- Formatted column data.tableFormatOptions
- Format options: startRow and endRow are added to the row,
startColumn and endColumn are added to each column.ignoredColumns
- Index numbers of columns to ignore.protected static Map<String,String> getExportTableFormatOptions(String formatType)
formatType
- The format type: csv, xls, or xml.Copyright © 2005–2016 The Kuali Foundation. All rights reserved.