Class ClassificationReportBuilderImpl
- All Implemented Interfaces:
ClassificationReport.Builder,Report.Builder<MonitorQueryItem,,TimeIntervalColumnHeader> TimeIntervalReportBuilder<ClassificationReport.Builder,MonitorQueryItem, TimeIntervalColumnHeader>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]protected String[]protected List<TimeIntervalColumnHeader>protected String[]protected String[]protected booleanprotected MonitorMapperprotected TaskState[]protected InternalTaskanaEngineprotected String[]protected WorkingTimeCalculator -
Constructor Summary
ConstructorsConstructorDescriptionClassificationReportBuilderImpl(InternalTaskanaEngine taskanaEngine, MonitorMapper monitorMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassificationReport.Builder_this()Returns a ClassificationReport.DetailedClassificationReport containing all tasks after applying the filters.buildDetailedReport(TaskTimestamp timestamp) buildReport(TaskTimestamp timestamp) Builds the Report for the specified TaskTimestamp.classificationCategoryIn(List<String> classificationCategories) Adds a list of classificationCategories to the builder.classificationIdIn(List<String> classificationIds) Adds a list of classificationIds to the builder.customAttributeIn(TaskCustomField customField, String... strings) Adds the values of a certain TaskCustomField for exact matching to the builder.customAttributeLike(TaskCustomField customField, String... strings) Adds the values of a certain TaskCustomField for pattern matching to the builder.customAttributeNotIn(TaskCustomField customField, String... strings) Excludes the values of a certain TaskCustomField to the builder.customIntAttributeIn(TaskCustomIntField customIntField, Integer... values) Adds the values of a certain TaskCustomIntField for exact matching to the builder.customIntAttributeNotIn(TaskCustomIntField customIntField, Integer... values) Excludes the values of a certain TaskCustomIntField to the builder.customIntAttributeNotWithin(TaskCustomIntField customIntField, IntInterval... values) Exclude ranges of TaskCustomIntField for matching to the builder.customIntAttributeWithin(TaskCustomIntField customIntField, IntInterval... values) Adds ranges of TaskCustomIntField for matching to the TimeIntervalReportBuilder.protected StringAdds a list of domains to the builder.excludedClassificationIdIn(List<String> excludedClassificationIds) Adds a list of excludedClassificationIds to the builder.protected List<CombinedClassificationFilter>If this filter is used, the days of the Report are counted in working days.listCustomAttributeValuesForCustomAttributeName(TaskCustomField taskCustomField) Returns a list of all values of an entered custom field that are in the Report.listTaskIdsForSelectedItems(List<SelectedItem> selectedItems, TaskTimestamp timestamp) Returns a list of all taskIds of the Report that are in the list of selected items.Adds a list of states to the builder.withColumnHeaders(List<TimeIntervalColumnHeader> columnHeaders) Adds a list TimeIntervalColumnHeaders to the Builder to subdivide theReportinto clusters.workbasketIdIn(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, waitMethods inherited from interface pro.taskana.monitor.api.reports.TimeIntervalReportBuilder
classificationCategoryIn, classificationIdIn, customAttributeIn, customAttributeLike, customAttributeNotIn, customIntAttributeIn, customIntAttributeNotIn, customIntAttributeNotWithin, customIntAttributeWithin, domainIn, excludedClassificationIdIn, inWorkingDays, listCustomAttributeValuesForCustomAttributeName, listTaskIdsForSelectedItems, stateIn, withColumnHeaders, workbasketIdIn
-
Field Details
-
taskanaEngine
-
monitorMapper
-
columnHeaders
-
inWorkingDays
protected boolean inWorkingDays -
workbasketIds
-
states
-
classificationCategories
-
domains
-
classificationIds
-
excludedClassificationIds
-
workingTimeCalculator
-
-
Constructor Details
-
ClassificationReportBuilderImpl
public ClassificationReportBuilderImpl(InternalTaskanaEngine taskanaEngine, MonitorMapper monitorMapper)
-
-
Method Details
-
buildReport
- Specified by:
buildReportin interfaceClassificationReport.Builder- Specified by:
buildReportin interfaceReport.Builder<MonitorQueryItem,TimeIntervalColumnHeader> - Throws:
InvalidArgumentExceptionNotAuthorizedException
-
buildReport
public ClassificationReport buildReport(TaskTimestamp timestamp) throws InvalidArgumentException, NotAuthorizedException Description copied from interface:TimeIntervalReportBuilderBuilds the Report for the specified TaskTimestamp.- Specified by:
buildReportin interfaceClassificationReport.Builder- Specified by:
buildReportin interfaceTimeIntervalReportBuilder<ClassificationReport.Builder,MonitorQueryItem, TimeIntervalColumnHeader> - Parameters:
timestamp- The TaskTimestamp of interest- Returns:
- The build Report
- Throws:
InvalidArgumentException- if an error occursNotAuthorizedException- if the current user is not member of TaskanaRole.MONITOR or TaskanaRole.ADMIN
-
buildDetailedReport
public ClassificationReport.DetailedClassificationReport buildDetailedReport() throws InvalidArgumentException, NotAuthorizedExceptionDescription copied from interface:ClassificationReport.BuilderReturns a ClassificationReport.DetailedClassificationReport containing all tasks after applying the filters. If the column headers are set the report is subdivided into clusters. ItsFoldableRows contain an additional list of Rows 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 current user is not member of TaskanaRole.MONITOR or TaskanaRole.ADMIN
-
buildDetailedReport
public ClassificationReport.DetailedClassificationReport buildDetailedReport(TaskTimestamp timestamp) throws InvalidArgumentException, NotAuthorizedException - Specified by:
buildDetailedReportin interfaceClassificationReport.Builder- Throws:
InvalidArgumentExceptionNotAuthorizedException
-
_this
-
determineGroupedBy
-
withColumnHeaders
Description copied from interface:TimeIntervalReportBuilderAdds a list TimeIntervalColumnHeaders to the Builder to subdivide theReportinto 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
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
Description copied from interface:TimeIntervalReportBuilderAdds a list of workbasket ids to the builder. The created Report contains only Tasks with a workbasketId 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
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
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:
classificationCategories- a list of classificationCategories- Returns:
- the TimeIntervalReportBuilder
-
classificationIdIn
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 ClassificationReport.Builder 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
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
-
customAttributeIn
public ClassificationReport.Builder customAttributeIn(TaskCustomField customField, String... strings) throws InvalidArgumentException Description copied from interface:TimeIntervalReportBuilderAdds the values of a certain TaskCustomField for exact matching to the builder.The created Report contains only Tasks with a custom attribute value exactly matching one of the items in the List.
- Specified by:
customAttributeInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customField- the specified TaskCustomFieldstrings- the values the specified custom attribute should match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
InvalidArgumentException- if filter values are not given
-
customAttributeNotIn
public ClassificationReport.Builder customAttributeNotIn(TaskCustomField customField, String... strings) throws InvalidArgumentException Description copied from interface:TimeIntervalReportBuilderExcludes the values of a certain TaskCustomField to the builder.The created Report contains only Tasks with a custom attribute value not matching one of the items in the List.
- Specified by:
customAttributeNotInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customField- the specified TaskCustomFieldstrings- the values the specified custom attribute should not match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
InvalidArgumentException- if filter values are not given
-
customIntAttributeIn
public ClassificationReport.Builder customIntAttributeIn(TaskCustomIntField customIntField, Integer... values) throws InvalidArgumentException Description copied from interface:TimeIntervalReportBuilderAdds the values of a certain TaskCustomIntField for exact matching to the builder.The created Report contains only Tasks with a custom attribute value exactly matching one of the items in the List.
- Specified by:
customIntAttributeInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customIntField- the specified TaskCustomIntFieldvalues- the values the specified customIntField should match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
InvalidArgumentException- if filter values are not given
-
customIntAttributeNotIn
public ClassificationReport.Builder customIntAttributeNotIn(TaskCustomIntField customIntField, Integer... values) throws InvalidArgumentException Description copied from interface:TimeIntervalReportBuilderExcludes the values of a certain TaskCustomIntField to the builder.The created Report contains only Tasks with a custom attribute value not matching one of the items in the List.
- Specified by:
customIntAttributeNotInin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customIntField- the specified TaskCustomIntFieldvalues- the values the specified customIntFields should not match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
InvalidArgumentException- if filter values are not given
-
customIntAttributeWithin
public ClassificationReport.Builder customIntAttributeWithin(TaskCustomIntField customIntField, IntInterval... values) throws IllegalArgumentException Description copied from interface:TimeIntervalReportBuilderAdds ranges of TaskCustomIntField for matching to the TimeIntervalReportBuilder.The created Report contains only Tasks with a customIntField value being inside the range of one of the items in the list.
- Specified by:
customIntAttributeWithinin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customIntField- the specified TaskCustomIntFieldvalues- the values the specified customIntField should match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
IllegalArgumentException
-
customIntAttributeNotWithin
public ClassificationReport.Builder customIntAttributeNotWithin(TaskCustomIntField customIntField, IntInterval... values) throws IllegalArgumentException Description copied from interface:TimeIntervalReportBuilderExclude ranges of TaskCustomIntField for matching to the builder.The created report contains only Tasks with a customIntField value being not inside the range of one of the items in the list.
- Specified by:
customIntAttributeNotWithinin interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customIntField- the specified TaskCustomIntFieldvalues- the values the specified customIntField should match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
IllegalArgumentException
-
customAttributeLike
public ClassificationReport.Builder customAttributeLike(TaskCustomField customField, String... strings) throws InvalidArgumentException Description copied from interface:TimeIntervalReportBuilderAdds the values of a certain TaskCustomField for pattern matching to the builder.The created Report contains only Tasks with a custom attribute value pattern-matching one of the items in the list. They will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.
- Specified by:
customAttributeLikein interfaceTimeIntervalReportBuilder<B extends TimeIntervalReportBuilder<B,I, H>, I extends AgeQueryItem, H extends TimeIntervalColumnHeader> - Parameters:
customField- the specified TaskCustomFieldstrings- the values the specified custom attribute should match- Returns:
- the modified TimeIntervalReportBuilder
- Throws:
InvalidArgumentException- if filter values are not given
-
listTaskIdsForSelectedItems
public List<String> listTaskIdsForSelectedItems(List<SelectedItem> selectedItems, TaskTimestamp timestamp) throws InvalidArgumentException, NotAuthorizedException 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 TaskTimestamp of interest- Returns:
- the list of all taskIds
- Throws:
InvalidArgumentException- if the column headers are not initializedNotAuthorizedException- if the current user is not member of TaskanaRole.MONITOR or TaskanaRole.ADMIN
-
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 TaskCustomField whose values should appear in the list- Returns:
- the list of all custom attribute values
- Throws:
NotAuthorizedException- if the current user is not member of TaskanaRole.MONITOR or TaskanaRole.ADMIN
-
getCombinedClassificationFilter
-