Package com.day.cq.reporting
Class Context
- java.lang.Object
-
- com.day.cq.reporting.Context
-
public class Context extends java.lang.ObjectThis 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, javax.jcr.Session reportSession)Creates a new context for creating a report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregateManagergetAggregateManager()Gets the aggregate manager to be used.PathResolvingCachegetCache()Gets the resolver cache to be used for creating the report.ComponentProvidergetComponentService()Gets a provider for report components.ColumngetOverriddenSortColumn()Gets the overridden sort column of the report.Sorting.DirectiongetOverriddenSortDir()Gets the overridden sort direction of the report.QueryBuildergetQueryBuilder()Gets the query builder.javax.jcr.SessiongetReportSession()Gets theSessionto execute the report.java.lang.StringgetReportUserId()Gets the user that has to be used to execute the report.SlingRepositorygetRepository()Gets the repository.java.util.ResourceBundlegetResourceBundle()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 Detail
-
Context
public Context(SlingRepository repository, QueryBuilder queryBuilder, ComponentProvider componentService, java.util.ResourceBundle resourceBundle, PathResolvingCache cache, javax.jcr.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 javax.jcr.Session getReportSession()
Gets theSessionto execute the report.- Returns:
- The
Session;nullif 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;
nullif 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;
nullto 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;nullto 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;
nullto 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;nullto keep the report's original sorting direction
-
-