Package com.day.cq.reporting
Interface Column
-
public interface Column
This interface represents a column, representing the data of a report.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanup()
Cleans up the column after using it.void
endProcessing()
Ends the postprocessing of data.java.lang.String
getActualType()
Returns the column's actual type for the current report setting.java.lang.String
getAggregateType()
Returns the aggregate type defined for the column.QueryEngineConfig
getColumnDef()
Get the query engine-specific column definitions.java.lang.String
getColumnType()
Returns the column's data type.java.lang.String
getName()
Gets the name of this instance of the column.java.lang.String
getPath()
Gets the path of this instance of the column.Sorting
getSorting()
Returns the sorting defined for the column.java.lang.String
getTitle()
Gets the title of this instance of the column.boolean
isGrouped()
Checks if the column is currently grouped.boolean
matchesFilter(FilteringPhase phase, DataRow rowToCheck)
Checks if the specifiedDataRow
matches the current filter settingsCellValue
preprocessData(ProcessingPhase type, DataRow row, boolean isAggregated, boolean isReportGrouped)
Preprocesses the specified data row.void
resolve(Session session, DataRow rowToResolve)
Resolves the column's value in the specified row if applicable.void
startProcessing()
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
DisplayDataType
for a list of officially supported display types. Note that there might be more supported types (which is why aString
is 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:
true
if 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
type
parameter (for example forProcessingPhase.APPLY
), the preprocessed data gets changed in theDataRow
specified.- Parameters:
type
- Type of preprocessing to be executedrow
- The row to be preprocessedisAggregated
-true
if the preprocessing is executed for the aggregated column value (if the column actually represents an aggregated value)isReportGrouped
-true
if the report as a whole is grouped- Returns:
- The preprocessed data
-
resolve
void resolve(Session session, DataRow rowToResolve) throws RepositoryException
Resolves 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:
RepositoryException
- if resolving the value has failed due to a repository problem
-
matchesFilter
boolean matchesFilter(FilteringPhase phase, DataRow rowToCheck)
Checks if the specifiedDataRow
matches the current filter settings- Parameters:
phase
- The current filtering phaserowToCheck
- The row to be checked against the filter- Returns:
true
if the row matches the filter and should be kept in the result set
-
cleanup
void cleanup()
Cleans up the column after using it.
-
-