Package com.day.cq.reporting
Interface Column
-
public interface ColumnThis interface represents a column, representing the data of a report.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanup()Cleans up the column after using it.voidendProcessing()Ends the postprocessing of data.java.lang.StringgetActualType()Returns the column's actual type for the current report setting.java.lang.StringgetAggregateType()Returns the aggregate type defined for the column.QueryEngineConfiggetColumnDef()Get the query engine-specific column definitions.java.lang.StringgetColumnType()Returns the column's data type.java.lang.StringgetName()Gets the name of this instance of the column.java.lang.StringgetPath()Gets the path of this instance of the column.SortinggetSorting()Returns the sorting defined for the column.java.lang.StringgetTitle()Gets the title of this instance of the column.booleanisGrouped()Checks if the column is currently grouped.booleanmatchesFilter(FilteringPhase phase, DataRow rowToCheck)Checks if the specifiedDataRowmatches the current filter settingsCellValuepreprocessData(ProcessingPhase type, DataRow row, boolean isAggregated, boolean isReportGrouped)Preprocesses the specified data row.voidresolve(javax.jcr.Session session, DataRow rowToResolve)Resolves the column's value in the specified row if applicable.voidstartProcessing()Starts the postprocessing of data.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
Gets the path of this instance of the column.- Returns:
- The path of this column (for example "/etc/reports/areport/jcr:content/report/col1")
-
getName
java.lang.String getName()
Gets the name of this instance of the column.- Returns:
- The name of this column (usually last part of the column's path)
-
getTitle
java.lang.String getTitle()
Gets the title of this instance of the column.- Returns:
- The title of the column
-
getColumnType
java.lang.String getColumnType()
Returns the column's data type.- Returns:
- The column's data type
-
getActualType
java.lang.String getActualType()
Returns the column's actual type for the current report setting.
Contrary to
getColumnType(), this method considers aggregation state.The returned value must be supported by the clientside reporting implementation. See
DisplayDataTypefor a list of officially supported display types. Note that there might be more supported types (which is why aStringis returned rather than aDisplayDataType).- Returns:
- The actual type
-
getColumnDef
QueryEngineConfig getColumnDef()
Get the query engine-specific column definitions.- Returns:
- The query engine-specific definition
-
isGrouped
boolean isGrouped()
Checks if the column is currently grouped.- Returns:
trueif the column is grouped
-
getAggregateType
java.lang.String getAggregateType()
Returns the aggregate type defined for the column.- Returns:
- The aggregate type defined for the column
-
getSorting
Sorting getSorting()
Returns the sorting defined for the column.- Returns:
- The sorting defined for the column
-
startProcessing
void startProcessing()
Starts the postprocessing of data.
-
endProcessing
void endProcessing()
Ends the postprocessing of data.
-
preprocessData
CellValue preprocessData(ProcessingPhase type, DataRow row, boolean isAggregated, boolean isReportGrouped)
Preprocesses the specified data row.
If required by the
typeparameter (for example forProcessingPhase.APPLY), the preprocessed data gets changed in theDataRowspecified.- Parameters:
type- Type of preprocessing to be executedrow- The row to be preprocessedisAggregated-trueif the preprocessing is executed for the aggregated column value (if the column actually represents an aggregated value)isReportGrouped-trueif the report as a whole is grouped- Returns:
- The preprocessed data
-
resolve
void resolve(javax.jcr.Session session, DataRow rowToResolve) throws javax.jcr.RepositoryExceptionResolves the column's value in the specified row if applicable.
The resolved value must be set in the row.
- Parameters:
session- JCR Session used for resolvingrowToResolve- The row- Throws:
javax.jcr.RepositoryException- if resolving the value has failed due to a repository problem
-
matchesFilter
boolean matchesFilter(FilteringPhase phase, DataRow rowToCheck)
Checks if the specifiedDataRowmatches the current filter settings- Parameters:
phase- The current filtering phaserowToCheck- The row to be checked against the filter- Returns:
trueif the row matches the filter and should be kept in the result set
-
cleanup
void cleanup()
Cleans up the column after using it.
-
-