Package com.day.cq.reporting
Class Context
java.lang.Object
com.day.cq.reporting.Context
This class represents the context for creating a report.
-
Constructor Summary
ConstructorsConstructorDescriptionContext(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, ResourceBundle resourceBundle, PathResolvingCache cache, String reportUserId) Creates a new context for creating a report.Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, ResourceBundle resourceBundle, PathResolvingCache cache, Session reportSession) Creates a new context for creating a report. -
Method Summary
Modifier and TypeMethodDescriptionGets the aggregate manager to be used.getCache()Gets the resolver cache to be used for creating the report.Gets a provider for report components.Gets the overridden sort column of the report.Gets the overridden sort direction of the report.Gets the query builder.Gets theSessionto execute the report.Gets the user that has to be used to execute the report.Gets the repository.Gets the resource bundle for text retrieval.voidsetOverriddenSortColumn(Column overriddenSortColumn) Sets the overridden sort column of the report.voidsetOverriddenSortDir(Sorting.Direction overriddenSortDir) Sets the overridden sort direction of the report.
-
Constructor Details
-
Context
public Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, ResourceBundle resourceBundle, PathResolvingCache cache, Session reportSession) Creates a new context for creating a report.- Parameters:
repository- The repositoryqueryBuilder- The query buildercomponentService- The provider for report componentsresourceBundle- The CQ resource bundle for text retrievalcache- The resolver cache to usereportSession- The preconfigured session to use
-
Context
public Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, ResourceBundle resourceBundle, PathResolvingCache cache, String reportUserId) Creates a new context for creating a report.- Parameters:
repository- The repositoryqueryBuilder- The query buildercomponentService- The provider for report componentsresourceBundle- The CQ resource bundle for text retrievalcache- The resolver cache to usereportUserId- The ID of the user to be used for accessing the repository
-
-
Method Details
-
getRepository
Gets the repository.- Returns:
- The repository
-
getQueryBuilder
Gets the query builder.- Returns:
- The query builder
-
getComponentService
Gets a provider for report components.- Returns:
- The provider for report components
-
getResourceBundle
Gets the resource bundle for text retrieval.- Returns:
- The resource bundle
-
getCache
Gets the resolver cache to be used for creating the report.- Returns:
- The resolver cache to be used
-
getAggregateManager
Gets the aggregate manager to be used.- Returns:
- The aggregate manager
-
getReportSession
Gets theSessionto execute the report.- Returns:
- The
Session;nullif a separate session with the user specified bygetReportUserId()should be used
-
getReportUserId
Gets the user that has to be used to execute the report.- Returns:
- The ID of the user;
nullif the "preconfigured" session provided bygetReportSession()should be used
-
getOverriddenSortColumn
Gets the overridden sort column of the report.- Returns:
- The overridden sort colummn of the report;
nullto keep the report's original sorting column(s)
-
setOverriddenSortColumn
Sets the overridden sort column of the report.- Parameters:
overriddenSortColumn- The overridden sort colummn of the report;nullto keep the report's original sorting column(s)
-
getOverriddenSortDir
Gets the overridden sort direction of the report.- Returns:
- The overridden sort direction of the report;
nullto keep the report's original sorting direction
-
setOverriddenSortDir
Sets the overridden sort direction of the report.- Parameters:
overriddenSortDir- The overridden direction of the report;nullto keep the report's original sorting direction
-