Package com.day.cq.reporting
Class Context
- java.lang.Object
-
- com.day.cq.reporting.Context
-
public class Context extends java.lang.Object
This class represents the context for creating a report.
-
-
Constructor Summary
Constructors Constructor Description Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, java.util.ResourceBundle resourceBundle, PathResolvingCache cache, java.lang.String reportUserId)
Creates a new context for creating a report.Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, java.util.ResourceBundle resourceBundle, PathResolvingCache cache, Session reportSession)
Creates a new context for creating a report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregateManager
getAggregateManager()
Gets the aggregate manager to be used.PathResolvingCache
getCache()
Gets the resolver cache to be used for creating the report.ComponentProvider
getComponentService()
Gets a provider for report components.Column
getOverriddenSortColumn()
Gets the overridden sort column of the report.Sorting.Direction
getOverriddenSortDir()
Gets the overridden sort direction of the report.QueryBuilder
getQueryBuilder()
Gets the query builder.Session
getReportSession()
Gets theSession
to execute the report.java.lang.String
getReportUserId()
Gets the user that has to be used to execute the report.SlingRepository
getRepository()
Gets the repository.java.util.ResourceBundle
getResourceBundle()
Gets the resource bundle for text retrieval.void
setOverriddenSortColumn(Column overriddenSortColumn)
Sets the overridden sort column of the report.void
setOverriddenSortDir(Sorting.Direction overriddenSortDir)
Sets the overridden sort direction of the report.
-
-
-
Constructor Detail
-
Context
public Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, java.util.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, java.util.ResourceBundle resourceBundle, PathResolvingCache cache, java.lang.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 Detail
-
getRepository
public SlingRepository getRepository()
Gets the repository.- Returns:
- The repository
-
getQueryBuilder
public QueryBuilder getQueryBuilder()
Gets the query builder.- Returns:
- The query builder
-
getComponentService
public ComponentProvider getComponentService()
Gets a provider for report components.- Returns:
- The provider for report components
-
getResourceBundle
public java.util.ResourceBundle getResourceBundle()
Gets the resource bundle for text retrieval.- Returns:
- The resource bundle
-
getCache
public PathResolvingCache getCache()
Gets the resolver cache to be used for creating the report.- Returns:
- The resolver cache to be used
-
getAggregateManager
public AggregateManager getAggregateManager()
Gets the aggregate manager to be used.- Returns:
- The aggregate manager
-
getReportSession
public Session getReportSession()
Gets theSession
to execute the report.- Returns:
- The
Session
;null
if a separate session with the user specified bygetReportUserId()
should be used
-
getReportUserId
public java.lang.String getReportUserId()
Gets the user that has to be used to execute the report.- Returns:
- The ID of the user;
null
if the "preconfigured" session provided bygetReportSession()
should be used
-
getOverriddenSortColumn
public Column getOverriddenSortColumn()
Gets the overridden sort column of the report.- Returns:
- The overridden sort colummn of the report;
null
to keep the report's original sorting column(s)
-
setOverriddenSortColumn
public void setOverriddenSortColumn(Column overriddenSortColumn)
Sets the overridden sort column of the report.- Parameters:
overriddenSortColumn
- The overridden sort colummn of the report;null
to keep the report's original sorting column(s)
-
getOverriddenSortDir
public Sorting.Direction getOverriddenSortDir()
Gets the overridden sort direction of the report.- Returns:
- The overridden sort direction of the report;
null
to keep the report's original sorting direction
-
setOverriddenSortDir
public void setOverriddenSortDir(Sorting.Direction overriddenSortDir)
Sets the overridden sort direction of the report.- Parameters:
overriddenSortDir
- The overridden direction of the report;null
to keep the report's original sorting direction
-
-