Class ClassificationReportBuilderImpl
- java.lang.Object
-
- pro.taskana.monitor.internal.reports.ClassificationReportBuilderImpl
-
- All Implemented Interfaces:
ClassificationReport.Builder,Report.Builder<MonitorQueryItem,TimeIntervalColumnHeader>,TimeIntervalReportBuilder<ClassificationReport.Builder,MonitorQueryItem,TimeIntervalColumnHeader>
public class ClassificationReportBuilderImpl extends Object implements ClassificationReport.Builder
The implementation of ClassificationReportBuilder.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>classificationCategoryprotected List<String>classificationIdsprotected List<H>columnHeadersprotected WorkingDaysToDaysConverterconverterprotected Map<TaskCustomField,String>customAttributeFilterprotected List<String>domainsprotected List<String>excludedClassificationIdsprotected booleaninWorkingDaysprotected MonitorMappermonitorMapperprotected List<TaskState>statesprotected InternalTaskanaEnginetaskanaEngineprotected List<String>workbasketIds
-
Constructor Summary
Constructors Constructor Description ClassificationReportBuilderImpl(InternalTaskanaEngine taskanaEngine, MonitorMapper monitorMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClassificationReport.Builder_this()ClassificationReport.DetailedClassificationReportbuildDetailedReport()Returns aClassificationReport.DetailedClassificationReportcontaining all tasks after applying the filters.ClassificationReport.DetailedClassificationReportbuildDetailedReport(TaskTimestamp timestamp)ClassificationReportbuildReport()ClassificationReportbuildReport(TaskTimestamp timestamp)Builds the given report.BclassificationCategoryIn(List<String> classificationCategory)Adds a list of classificationCategories to the builder.BclassificationIdIn(List<String> classificationIds)Adds a list of classificationIds to the builder.BcustomAttributeFilterIn(Map<TaskCustomField,String> customAttributeFilter)Adds a map of custom attributes and custom attribute values to the builder.protected StringdetermineGroupedBy()BdomainIn(List<String> domains)Adds a list of domains to the builder.BexcludedClassificationIdIn(List<String> excludedClassificationIds)Adds a list of excludedClassificationIds to the builder.protected List<CombinedClassificationFilter>getCombinedClassificationFilter()BinWorkingDays()If this filter is used, the days of the report are counted in working days.List<String>listCustomAttributeValuesForCustomAttributeName(TaskCustomField taskCustomField)Returns a list of all values of an entered custom field that are in the report.List<String>listTaskIdsForSelectedItems(List<SelectedItem> selectedItems, TaskTimestamp timestamp)Returns a list of all taskIds of the report that are in the list of selected items.BstateIn(List<TaskState> states)Adds a list of states to the builder.BwithColumnHeaders(List<H> columnHeaders)Adds a listTimeIntervalColumnHeaders to the builder to subdivide the report into clusters.BworkbasketIdIn(List<String> workbasketIds)Adds a list of workbasket ids to the builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pro.taskana.monitor.api.reports.TimeIntervalReportBuilder
classificationCategoryIn, classificationIdIn, customAttributeFilterIn, domainIn, excludedClassificationIdIn, inWorkingDays, listCustomAttributeValuesForCustomAttributeName, listTaskIdsForSelectedItems, stateIn, withColumnHeaders, workbasketIdIn
-
-
-
-
Field Detail
-
taskanaEngine
protected InternalTaskanaEngine taskanaEngine
-
monitorMapper
protected MonitorMapper monitorMapper
-
columnHeaders
protected List<H extends TimeIntervalColumnHeader> columnHeaders
-
inWorkingDays
protected boolean inWorkingDays
-
customAttributeFilter
protected Map<TaskCustomField,String> customAttributeFilter
-
converter
protected WorkingDaysToDaysConverter converter
-
-
Constructor Detail
-
ClassificationReportBuilderImpl
public ClassificationReportBuilderImpl(InternalTaskanaEngine taskanaEngine, MonitorMapper monitorMapper)
-
-
Method Detail
-
buildReport
public ClassificationReport buildReport() throws NotAuthorizedException, InvalidArgumentException
- Specified by:
buildReportin interfaceClassificationReport.Builder- Specified by:
buildReportin interfaceReport.Builder<MonitorQueryItem,TimeIntervalColumnHeader>- Throws:
NotAuthorizedExceptionInvalidArgumentException
-
buildReport
public ClassificationReport buildReport(TaskTimestamp timestamp) throws InvalidArgumentException, NotAuthorizedException
Description copied from interface:TimeIntervalReportBuilderBuilds the given report.- Specified by:
buildReportin interfaceClassificationReport.Builder- Specified by:
buildReportin interfaceTimeIntervalReportBuilder<ClassificationReport.Builder,MonitorQueryItem,TimeIntervalColumnHeader>- Parameters:
timestamp- The task timestamp of interest- Returns:
- The build report
- Throws:
InvalidArgumentException- if an error occursNotAuthorizedException- if the user has no rights to access the monitor
-
buildDetailedReport
public ClassificationReport.DetailedClassificationReport buildDetailedReport() throws InvalidArgumentException, NotAuthorizedException
Description copied from interface:ClassificationReport.BuilderReturns aClassificationReport.DetailedClassificationReportcontaining all tasks after applying the filters. If the column headers are set the report is subdivided into clusters. ItsFoldableRows contain an additional list ofRows for the classifications of the attachments of the tasks.- Specified by:
buildDetailedReportin interfaceClassificationReport.Builder- Returns:
- the DetailedClassificationReport
- Throws:
InvalidArgumentException- if the column headers are not initializedNotAuthorizedException- if the user has no rights to access the monitor
-
buildDetailedReport
public ClassificationReport.DetailedClassificationReport buildDetailedReport(TaskTimestamp timestamp) throws InvalidArgumentException, NotAuthorizedException
- Specified by:
buildDetailedReportin interfaceClassificationReport.Builder- Throws:
InvalidArgumentExceptionNotAuthorizedException
-
_this
protected ClassificationReport.Builder _this()
-
determineGroupedBy
protected String determineGroupedBy()
-
withColumnHeaders
public B withColumnHeaders(List<H> columnHeaders)
Description copied from interface:TimeIntervalReportBuilderAdds a listTimeIntervalColumnHeaders to the builder to subdivide the report into clusters.- Specified by:
withColumnHeadersin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
columnHeaders- the column headers the report should consist of.- Returns:
- the TimeIntervalReportBuilder
-
inWorkingDays
public B inWorkingDays()
Description copied from interface:TimeIntervalReportBuilderIf this filter is used, the days of the report are counted in working days.- Specified by:
inWorkingDaysin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Returns:
- the TimeIntervalReportBuilder
-
workbasketIdIn
public B workbasketIdIn(List<String> workbasketIds)
Description copied from interface:TimeIntervalReportBuilderAdds a list of workbasket ids to the builder. The created report contains only tasks with a workbasket id in this list.- Specified by:
workbasketIdInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
workbasketIds- a list of workbasket ids- Returns:
- the TimeIntervalReportBuilder
-
stateIn
public B stateIn(List<TaskState> states)
Description copied from interface:TimeIntervalReportBuilderAdds a list of states to the builder. The created report contains only tasks with a state in this list.- Specified by:
stateInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
states- a list of states- Returns:
- the TimeIntervalReportBuilder
-
classificationCategoryIn
public B classificationCategoryIn(List<String> classificationCategory)
Description copied from interface:TimeIntervalReportBuilderAdds a list of classificationCategories to the builder. The created report contains only tasks with a category in this list.- Specified by:
classificationCategoryInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
classificationCategory- a list of classificationCategories- Returns:
- the TimeIntervalReportBuilder
-
classificationIdIn
public B classificationIdIn(List<String> classificationIds)
Description copied from interface:TimeIntervalReportBuilderAdds a list of classificationIds to the builder. The created report contains only tasks with a classificationId in this list.- Specified by:
classificationIdInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
classificationIds- a list of classificationIds- Returns:
- the TimeIntervalReportBuilder
-
excludedClassificationIdIn
public B excludedClassificationIdIn(List<String> excludedClassificationIds)
Description copied from interface:TimeIntervalReportBuilderAdds a list of excludedClassificationIds to the builder. The created report contains only tasks with a classificationId NOT in this list.- Specified by:
excludedClassificationIdInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
excludedClassificationIds- a list of excludedClassificationIds- Returns:
- the TimeIntervalReportBuilder
-
domainIn
public B domainIn(List<String> domains)
Description copied from interface:TimeIntervalReportBuilderAdds a list of domains to the builder. The created report contains only tasks with a domain in this list.- Specified by:
domainInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
domains- a list of domains- Returns:
- the TimeIntervalReportBuilder
-
customAttributeFilterIn
public B customAttributeFilterIn(Map<TaskCustomField,String> customAttributeFilter)
Description copied from interface:TimeIntervalReportBuilderAdds a map of custom attributes and custom attribute values to the builder. The created report contains only tasks with a custom attribute value in this list.- Specified by:
customAttributeFilterInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
customAttributeFilter- a map of custom attributes and custom attribute value- Returns:
- the TimeIntervalReportBuilder
-
listTaskIdsForSelectedItems
public List<String> listTaskIdsForSelectedItems(List<SelectedItem> selectedItems, TaskTimestamp timestamp) throws NotAuthorizedException, InvalidArgumentException
Description copied from interface:TimeIntervalReportBuilderReturns a list of all taskIds of the report that are in the list of selected items.- Specified by:
listTaskIdsForSelectedItemsin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
selectedItems- a list of selectedItemstimestamp- the task timestamp of interest- Returns:
- the list of all taskIds
- Throws:
NotAuthorizedException- if the user has no rights to access the monitorInvalidArgumentException- if the column headers are not initialized
-
listCustomAttributeValuesForCustomAttributeName
public List<String> listCustomAttributeValuesForCustomAttributeName(TaskCustomField taskCustomField) throws NotAuthorizedException
Description copied from interface:TimeIntervalReportBuilderReturns a list of all values of an entered custom field that are in the report.- Specified by:
listCustomAttributeValuesForCustomAttributeNamein interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I,H>,I extends AgeQueryItem,H extends TimeIntervalColumnHeader>- Parameters:
taskCustomField- the customField whose values should appear in the list- Returns:
- the list of all custom attribute values
- Throws:
NotAuthorizedException- if the user has no rights to access the monitor
-
getCombinedClassificationFilter
protected List<CombinedClassificationFilter> getCombinedClassificationFilter()
-
-