diff --git a/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java b/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java index 92b070110..2c6eb5bcc 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java +++ b/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java @@ -15,371 +15,390 @@ import pro.taskana.impl.TaskState; public interface TaskMonitorService { /** - * Returns a {@link Report} for a given list of {@link Workbasket}s and for a given list of {@link TaskState}s. The - * report only contains the number of all tasks of the respective workbasket as well as the total sum of all tasks. - * Only tasks with a state in the list of TaskStates and a category in the list of categories are provided. Task + * Returns a {@link Report} grouped by workbaskets. The report contains the total numbers of tasks of the respective + * workbasket as well as the total number of all tasks. The tasks of the report are filtered by workbaskets, states, + * categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets to filter by workbaskets + * @param states + * a list of states to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @return the report + */ + Report getWorkbasketLevelReport(List workbaskets, List states, List categories, + List domains); + + /** + * Returns a {@link Report} grouped by workbaskets. For each workbasket the report contains the total number of + * tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. By default the age of the tasks is counted in working days. Furthermore the + * Report contains a sum line that contains the total numbers of the different clusters and the total number of all + * tasks in this report. The tasks of the report are filtered by workbaskets, states, categories and domains. Task * with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects that should be listed in the report + * a list of workbaskets objects to filter by workbaskets * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * a list of states objects to filter by states * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @return a {@link Report} object that only contains the number of all tasks of the respective workbasket as well - * as the total number of all tasks - */ - Report getWorkbasketLevelReport(List workbaskets, List states, List categories); - - /** - * Returns a {@link Report} for a given list of {@link Workbasket}s, a given list of {@link TaskState}s and a given - * list of {@link ReportLineItemDefinition}s. For each workbasket the report contains a list of ReportLineItems that - * subdivides the report in to different cluster grouped by the due date. By default the age of the tasks is counted - * in working days. Only tasks with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null - * are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects that should be listed in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition * should represent a single day, lowerLimit and upperLimit have to be equal. - * @return a {@link Report} object that represents an overview of all tasks in the + * @return the report */ Report getWorkbasketLevelReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions); + List categories, List domains, List reportLineItemDefinitions); /** - * Returns a {@link Report} for a given list of {@link Workbasket}s, a given list of {@link TaskState}s and a given - * list of {@link ReportLineItemDefinition}s. For each workbasket the report contains a list of ReportLineItems that - * subdivides the report in to different cluster grouped by the due date. Only tasks with a state in the list of - * TaskStates are provided. Tasks with Timestamp DUE = null are not considered. + * Returns a {@link Report} grouped by workbaskets. For each workbasket the report contains the total number of + * tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. It can be specified whether the age of the tasks is counted in days or in + * working days. Furthermore the report contains a sum line that contains the total numbers of the different + * clusters and the total number of all tasks. The tasks of the report are filtered by workbaskets, states, + * categories and domains. Task with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects that should be listed in the report + * a list of workbaskets objects to filter by workbaskets * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * a list of states objects to filter by states * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition * should represent a single day, lowerLimit and upperLimit have to be equal. * @param inWorkingDays * a boolean parameter that specifies whether the age of the tasks should be counted in days or in - * working days. - * @return a {@link Report} object that represents an overview of all tasks in the + * working days + * @return the report */ Report getWorkbasketLevelReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions, boolean inWorkingDays); + List categories, List domains, List reportLineItemDefinitions, + boolean inWorkingDays); /** - * Returns a {@link Report} with categories for a given list of {@link Workbasket}s and for a given list of - * {@link TaskState}s. The report only contains the number of all tasks of the respective category as well as the - * total sum of all tasks. Only tasks with a state in the list of TaskStates are provided. Task with Timestamp DUE = - * null are not considered. + * Returns a {@link Report} grouped by categories. The report contains the total numbers of tasks of the respective + * category as well as the total number of all tasks. The tasks of the report are filtered by workbaskets, states, + * categories and domains. Task with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report + * a list of workbaskets to filter by workbaskets * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * a list of states to filter by states * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @return a {@link Report} object that only contains the number of all tasks of the respective category as well as - * the total number of all tasks - */ - Report getCategoryReport(List workbaskets, List states, List categories); - - /** - * Returns a {@link Report} with categories for a given list of {@link Workbasket}s, a given list of - * {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. For each category the report contains a - * list of ReportLineItems that subdivides the report in to different cluster grouped by the due date. By default - * the age of the tasks is counted in working days. Only tasks with a state in the list of TaskStates are provided. - * Tasks with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. - * @return a {@link Report} object that represents an overview of all tasks of the respective category + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @return the report */ Report getCategoryReport(List workbaskets, List states, List categories, - List reportLineItemDefinitions); + List domains); /** - * Returns a {@link Report} with categories for a given list of {@link Workbasket}s, a given list of - * {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. For each category the report contains a - * list of ReportLineItems that subdivides the report in to different cluster grouped by the due date. Only tasks - * with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. - * @param inWorkingDays - * a boolean parameter that specifies whether the age of the tasks should be counted in days or in - * working days. - * @return a {@link Report} object that represents an overview of all tasks of the respective category - */ - Report getCategoryReport(List workbaskets, List states, List categories, - List reportLineItemDefinitions, boolean inWorkingDays); - - /** - * Returns a {@link ClassificationReport} grouped by classifications for a given list of {@link Workbasket}s and for - * a given list of {@link TaskState}s. The report only contains the number of all tasks of the respective - * classification as well as the total sum of all tasks. Only tasks with a state in the list of TaskStates are - * provided. Task with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @return a {@link ClassificationReport} object that only contains the number of all tasks of the respective - * classification as well as the total number of all tasks - */ - ClassificationReport getClassificationReport(List workbaskets, List states, - List categories); - - /** - * Returns a {@link ClassificationReport} grouped by classifications for a given list of {@link Workbasket}s, a - * given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. For each classification - * the report contains a list of ReportLineItems that subdivides the report in to different cluster grouped by the - * due date. By default the age of the tasks is counted in working days. Only tasks with a state in the list of - * TaskStates are provided. Tasks with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. - * @return a {@link ClassificationReport} object that represents an overview of all tasks of the respective - * classification - */ - ClassificationReport getClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions); - - /** - * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of - * {@link Workbasket}s, a given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. - * For each classification the report contains a list of ReportLineItems that subdivides the report in to different - * cluster grouped by the due date. Only tasks with a state in the list of TaskStates are provided. Tasks with - * Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. - * @param inWorkingDays - * a boolean parameter that specifies whether the age of the tasks should be counted in days or in - * working days. - * @return a {@link DetailedClassificationReport} object that represents an overview of all tasks of the respective - * classification - */ - DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions, boolean inWorkingDays); - - /** - * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of {@link Workbasket}s - * and for a given list of {@link TaskState}s. The report only contains the number of all tasks of the respective - * classification as well as the total sum of all tasks. Only tasks with a state in the list of TaskStates are - * provided. Task with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @return a {@link DetailedClassificationReport} object that only contains the number of all tasks of the - * respective classification as well as the total number of all tasks - */ - DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, - List categories); - - /** - * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of - * {@link Workbasket}s, a given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. - * For each classification the report contains a list of ReportLineItems that subdivides the report in to different - * cluster grouped by the due date. By default the age of the tasks is counted in working days. Only tasks with a - * state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. - * @return a {@link DetailedClassificationReport} object that represents an overview of all tasks of the respective - * classification - */ - DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions); - - /** - * Returns a {@link ClassificationReport} grouped by classifications for a given list of {@link Workbasket}s, a - * given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. For each classification - * the report contains a list of ReportLineItems that subdivides the report in to different cluster grouped by the - * due date. Only tasks with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not + * Returns a {@link Report} grouped by categories. For each category the report contains the total number of tasks + * and the number of tasks of the respective cluster that are specified by the {@link ReportLineItemDefinition}s. By + * default the age of the tasks is counted in working days. Furthermore the Report contains a sum line that contains + * the total numbers of the different clusters and the total number of all tasks in this report. The tasks of the + * report are filtered by workbaskets, states, categories and domains. Task with Timestamp DUE = null are not * considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report + * a list of workbaskets objects to filter by workbaskets * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * a list of states objects to filter by states * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @return the report + */ + Report getCategoryReport(List workbaskets, List states, List categories, + List domains, List reportLineItemDefinitions); + + /** + * Returns a {@link Report} grouped by categories. For each category the report contains the total number of tasks + * and the number of tasks of the respective cluster that are specified by the {@link ReportLineItemDefinition}s. It + * can be specified whether the age of the tasks is counted in days or in working days. Furthermore the report + * contains a sum line that contains the total numbers of the different clusters and the total number of all tasks. + * The tasks of the report are filtered by workbaskets, states, categories and domains. Task with Timestamp DUE = + * null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition * should represent a single day, lowerLimit and upperLimit have to be equal. * @param inWorkingDays * a boolean parameter that specifies whether the age of the tasks should be counted in days or in - * working days. - * @return a {@link ClassificationReport} object that represents an overview of all tasks of the respective - * classification + * working days + * @return the report + */ + Report getCategoryReport(List workbaskets, List states, List categories, + List domains, List reportLineItemDefinitions, boolean inWorkingDays); + + /** + * Returns a {@link Classification} grouped by classifications. The report contains the total numbers of tasks of + * the respective classification as well as the total number of all tasks. The tasks of the report are filtered by + * workbaskets, states, categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets to filter by workbaskets + * @param states + * a list of states to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @return the ClassificationReport */ ClassificationReport getClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions, boolean inWorkingDays); + List categories, List domains); /** - * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of - * {@link Workbasket}s and for a given list of {@link TaskState}s. The report only contains the number of all tasks - * of the respective value of the custom field as well as the total sum of all tasks. Only tasks with a state in the - * list of TaskStates are provided. Task with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param customField - * a {@link CustomField} whose values should be listed in the report - * @return a {@link Report} object that only contains the number of all tasks of the respective value of the custom - * field as well as the total number of all tasks - */ - Report getCustomFieldValueReport(List workbaskets, List states, List categories, - CustomField customField); - - /** - * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of - * {@link Workbasket}s, a given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. - * For each value of the custom field the report contains a list of ReportLineItems that subdivides the report in to - * different cluster grouped by the due date. By default the age of the tasks is counted in working days. Only tasks - * with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. - * - * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report - * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided - * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param customField - * a {@link CustomField} whose values should be listed in the report - * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these - * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition - * should represent a single day, lowerLimit and upperLimit have to be equal. a custom field whose values - * should be listed in the report - * @return a {@link Report} object that represents an overview of all tasks of the respective value of the custom - * field - */ - Report getCustomFieldValueReport(List workbaskets, List states, List categories, - CustomField customField, List reportLineItemDefinitions); - - /** - * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of - * {@link Workbasket}s, a given list of {@link TaskState}s and a given list of {@link ReportLineItemDefinition}s. - * For each value of the custom field the report contains a list of ReportLineItems that subdivides the report in to - * different cluster grouped by the due date. Only tasks with a state in the list of TaskStates are provided. Tasks + * Returns a {@link Classification} grouped by classifications. For each classification the report contains the + * total number of tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. By default the age of the tasks is counted in working days. Furthermore the + * Report contains a sum line that contains the total numbers of the different clusters and the total number of all + * tasks in this report. The tasks of the report are filtered by workbaskets, states, categories and domains. Task * with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose tasks should be considered in the report + * a list of workbaskets objects to filter by workbaskets * @param states - * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * a list of states objects to filter by states * @param categories - * a list of categories. Only tasks with a classification of this these categories are listed in the - * report - * @param customField - * a {@link CustomField} whose values should be listed in the report + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains * @param reportLineItemDefinitions - * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster - * of due dates. Days in past are represented as negative values and days in the future are represented - * as positive values. To avoid tasks are counted multiple times or not be listed in the report, these + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @return the ClassificationReport + */ + ClassificationReport getClassificationReport(List workbaskets, List states, + List categories, List domains, List reportLineItemDefinitions); + + /** + * Returns a {@link ClassificationReport} grouped by classification. For each classification the report contains the + * total number of tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. It can be specified whether the age of the tasks is counted in days or in + * working days. Furthermore the report contains a sum line that contains the total numbers of the different + * clusters and the total number of all tasks. The tasks of the report are filtered by workbaskets, states, + * categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition * should represent a single day, lowerLimit and upperLimit have to be equal. * @param inWorkingDays * a boolean parameter that specifies whether the age of the tasks should be counted in days or in - * working days. - * @return a {@link Report} object that represents an overview of all tasks of the respective value of the custom - * field + * working days + * @return the ClassificationReport + */ + ClassificationReport getClassificationReport(List workbaskets, List states, + List categories, List domains, List reportLineItemDefinitions, + boolean inWorkingDays); + + /** + * Returns a {@link DetailedClassificationReport}. The report contains the total numbers of tasks of the respective + * classification as well as the total number of all tasks. Each ReportLine contains an additional list of + * ReportLines for the classifications of the attachments of the tasks. The tasks of the report are filtered by + * workbaskets, states, categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets to filter by workbaskets + * @param states + * a list of states to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @return the DetailedClassificationReport + */ + DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, + List categories, List domains); + + /** + * Returns a {@link DetailedClassificationReport}. For each classification the report contains the total number of + * tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. By default the age of the tasks is counted in working days. Each ReportLine + * contains an additional list of ReportLines for the classifications of the attachments of the tasks. Furthermore + * the Report contains a sum line that contains the total numbers of the different clusters and the total number of + * all tasks in this report. The tasks of the report are filtered by workbaskets, states, categories and domains. + * Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @return the DetailedClassificationReport + */ + DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, + List categories, List domains, List reportLineItemDefinitions); + + /** + * Returns a {@link DetailedClassificationReport}. For each classification the report contains the total number of + * tasks and the number of tasks of the respective cluster that are specified by the + * {@link ReportLineItemDefinition}s. It can be specified whether the age of the tasks is counted in days or in + * working days. Each ReportLine contains an additional list of ReportLines for the classifications of the + * attachments of the tasks. Furthermore the report contains a sum line that contains the total numbers of the + * different clusters and the total number of all tasks. The tasks of the report are filtered by workbaskets, + * states, categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @param inWorkingDays + * a boolean parameter that specifies whether the age of the tasks should be counted in days or in + * working days + * @return the DetailedClassificationReport + */ + DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, + List categories, List domains, List reportLineItemDefinitions, + boolean inWorkingDays); + + /** + * Returns a {@link Report} grouped by the value of a certain {@link CustomField}. The report contains the total + * numbers of tasks of the respective custom field as well as the total number of all tasks. The tasks of the report + * are filtered by workbaskets, states, categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets to filter by workbaskets + * @param states + * a list of states to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param customField + * a custom field whose values should be listed in the report + * @return the report */ Report getCustomFieldValueReport(List workbaskets, List states, List categories, - CustomField customField, List reportLineItemDefinitions, boolean inWorkingDays); + List domains, CustomField customField); + + /** + * Returns a {@link Report} grouped by the value of a certain {@link CustomField}. For each value of the custom + * field the report contains the total number of tasks and the number of tasks of the respective cluster that are + * specified by the {@link ReportLineItemDefinition}s. By default the age of the tasks is counted in working days. + * Furthermore the Report contains a sum line that contains the total numbers of the different clusters and the + * total number of all tasks in this report. The tasks of the report are filtered by workbaskets, states, categories + * and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param customField + * a custom field whose values should be listed in the report + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @return the report + */ + Report getCustomFieldValueReport(List workbaskets, List states, List categories, + List domains, CustomField customField, List reportLineItemDefinitions); + + /** + * Returns a {@link Report} grouped by the value of a certain {@link CustomField}. For each value of the custom + * field the report contains the total number of tasks and the number of tasks of the respective cluster that are + * specified by the {@link ReportLineItemDefinition}s. It can be specified whether the age of the tasks is counted + * in days or in working days. Furthermore the report contains a sum line that contains the total numbers of the + * different clusters and the total number of all tasks. The tasks of the report are filtered by workbaskets, + * states, categories and domains. Task with Timestamp DUE = null are not considered. + * + * @param workbaskets + * a list of workbaskets objects to filter by workbaskets + * @param states + * a list of states objects to filter by states + * @param categories + * a list of categories to filter by categories + * @param domains + * a list of domains to filter by domains + * @param customField + * a custom field whose values should be listed in the report + * @param reportLineItemDefinitions + * a list of reportLineItemDefinitions that specify the subdivision into different cluster of due dates. + * Days in past are represented as negative values and days in the future are represented as positive + * values. To avoid tasks are counted multiple times or not be listed in the report, these + * reportLineItemDefinitions should not overlap and should not have gaps. If the ReportLineDefinition + * should represent a single day, lowerLimit and upperLimit have to be equal. + * @param inWorkingDays + * a boolean parameter that specifies whether the age of the tasks should be counted in days or in + * working days + * @return the report + */ + Report getCustomFieldValueReport(List workbaskets, List states, List categories, + List domains, CustomField customField, List reportLineItemDefinitions, + boolean inWorkingDays); } diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/ClassificationReport.java b/lib/taskana-core/src/main/java/pro/taskana/impl/ClassificationReport.java index 7eeee3c23..c1e51d4c8 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/ClassificationReport.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/ClassificationReport.java @@ -1,7 +1,8 @@ package pro.taskana.impl; /** - * The ClassificationReport extends the Report. + * The ClassificationReport extends the Report. The {@link ReportLine}s of the ClassificationReport are grouped by + * classifications. */ public class ClassificationReport extends Report { diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedClassificationReport.java b/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedClassificationReport.java index dea9d36d0..cfd27753c 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedClassificationReport.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedClassificationReport.java @@ -3,7 +3,9 @@ package pro.taskana.impl; import java.util.List; /** - * The DetailedClassificationReport extends the ClassificationReport. The additional addDetailedMonitoringQueryItems + * The DetailedClassificationReport extends the {@link ClassificationReport}. In contrast to the ClassificationReport + * there are DetailedReportLines instead of ReportLines. That means each ReportLine contains an additional list of + * ReportLines for the classifications of the attachments of the tasks. The additional addDetailedMonitoringQueryItems * method allows to add {@link DetailedMonitorQueryItem}s to the DetailedClassificationReport. */ public class DetailedClassificationReport extends ClassificationReport { diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedReportLine.java b/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedReportLine.java index 130f9076f..55f046ddf 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedReportLine.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/DetailedReportLine.java @@ -5,7 +5,8 @@ import java.util.List; import java.util.Map; /** - * The DetailedReportLine extends the ReportLine. + * The DetailedReportLine extends the {@link ReportLine}. In contrast to the ReportLine there is an additional list of + * ReportLines for the classifications of the attachments of the tasks. */ public class DetailedReportLine extends ReportLine { diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java b/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java index 72bb8600f..ec73fd6d9 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java @@ -28,19 +28,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public Report getWorkbasketLevelReport(List workbaskets, List states, - List categories) { - return getWorkbasketLevelReport(workbaskets, states, categories, null, false); + List categories, List domains) { + return getWorkbasketLevelReport(workbaskets, states, categories, domains, null, false); } @Override public Report getWorkbasketLevelReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions) { - return getWorkbasketLevelReport(workbaskets, states, categories, reportLineItemDefinitions, true); + List categories, List domains, List reportLineItemDefinitions) { + return getWorkbasketLevelReport(workbaskets, states, categories, domains, reportLineItemDefinitions, true); } @Override public Report getWorkbasketLevelReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions, boolean inWorkingDays) { + List categories, List domains, List reportLineItemDefinitions, + boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getWorkbasketLevelReport(workbaskets = {}, states = {}, reportLineItemDefinitions = {}," @@ -53,7 +54,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfWorkbasketsByWorkbasketsAndStates(workbaskets, states, categories); + .getTaskCountOfWorkbasketsByWorkbasketsAndStates(workbaskets, states, categories, domains); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -65,19 +66,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { } @Override - public Report getCategoryReport(List workbaskets, List states, List categories) { - return getCategoryReport(workbaskets, states, categories, null, false); + public Report getCategoryReport(List workbaskets, List states, List categories, + List domains) { + return getCategoryReport(workbaskets, states, categories, domains, null, false); } @Override public Report getCategoryReport(List workbaskets, List states, List categories, - List reportLineItemDefinitions) { - return getCategoryReport(workbaskets, states, categories, reportLineItemDefinitions, true); + List domains, List reportLineItemDefinitions) { + return getCategoryReport(workbaskets, states, categories, domains, reportLineItemDefinitions, true); } @Override public Report getCategoryReport(List workbaskets, List states, List categories, - List reportLineItemDefinitions, boolean inWorkingDays) { + List domains, List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getCategoryReport(workbaskets = {}, states = {}, reportLineItemDefinitions = {}," @@ -90,7 +92,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfCategoriesByWorkbasketsAndStates(workbaskets, states, categories); + .getTaskCountOfCategoriesByWorkbasketsAndStates(workbaskets, states, categories, domains); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -102,19 +104,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public ClassificationReport getClassificationReport(List workbaskets, List states, - List categories) { - return getClassificationReport(workbaskets, states, categories, null, false); + List categories, List domains) { + return getClassificationReport(workbaskets, states, categories, domains, null, false); } @Override public ClassificationReport getClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions) { - return getClassificationReport(workbaskets, states, categories, reportLineItemDefinitions, true); + List categories, List domains, List reportLineItemDefinitions) { + return getClassificationReport(workbaskets, states, categories, domains, reportLineItemDefinitions, true); } @Override public ClassificationReport getClassificationReport(List workbaskets, List states, - List categories, List reportLineItemDefinitions, boolean inWorkingDays) { + List categories, List domains, List reportLineItemDefinitions, + boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getClassificationReport(workbaskets = {}, states = {}, reportLineItemDefinitions = {}," @@ -127,7 +130,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { ClassificationReport report = new ClassificationReport(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfClassificationsByWorkbasketsAndStates(workbaskets, states, categories); + .getTaskCountOfClassificationsByWorkbasketsAndStates(workbaskets, states, categories, domains); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -139,19 +142,22 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states, List categories) { - return getDetailedClassificationReport(workbaskets, states, categories, null, false); + List states, List categories, List domains) { + return getDetailedClassificationReport(workbaskets, states, categories, domains, null, false); } @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states, List categories, List reportLineItemDefinitions) { - return getDetailedClassificationReport(workbaskets, states, categories, reportLineItemDefinitions, true); + List states, List categories, List domains, + List reportLineItemDefinitions) { + return getDetailedClassificationReport(workbaskets, states, categories, domains, reportLineItemDefinitions, + true); } @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states, List categories, List reportLineItemDefinitions, + List states, List categories, List domains, + List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { @@ -166,7 +172,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { DetailedClassificationReport report = new DetailedClassificationReport(); List detailedMonitorQueryItems = taskMonitorMapper - .getTaskCountOfDetailedClassificationsByWorkbasketsAndStates(workbaskets, states, categories); + .getTaskCountOfDetailedClassificationsByWorkbasketsAndStates(workbaskets, states, categories, domains); report.addDetailedMonitoringQueryItems(detailedMonitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -179,19 +185,22 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public Report getCustomFieldValueReport(List workbaskets, List states, - List categories, CustomField customField) { - return getCustomFieldValueReport(workbaskets, states, categories, customField, null, false); + List categories, List domains, CustomField customField) { + return getCustomFieldValueReport(workbaskets, states, categories, domains, customField, null, false); } @Override public Report getCustomFieldValueReport(List workbaskets, List states, - List categories, CustomField customField, List reportLineItemDefinitions) { - return getCustomFieldValueReport(workbaskets, states, categories, customField, reportLineItemDefinitions, true); + List categories, List domains, CustomField customField, + List reportLineItemDefinitions) { + return getCustomFieldValueReport(workbaskets, states, categories, domains, customField, + reportLineItemDefinitions, true); } @Override public Report getCustomFieldValueReport(List workbaskets, List states, - List categories, CustomField customField, List reportLineItemDefinitions, + List categories, List domains, CustomField customField, + List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( @@ -206,7 +215,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper .getTaskCountOfCustomFieldValuesByWorkbasketsAndStatesAndCustomField(workbaskets, states, categories, - customField); + domains, customField); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java index bee941d6a..a913c9944 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java @@ -25,6 +25,7 @@ public interface TaskMonitorMapper { + "WHERE WORKBASKET_KEY IN (#{workbasket.key}) " + "AND STATE IN (#{state}) " + "AND CLASSIFICATION_CATEGORY IN (#{category}) " + + "AND DOMAIN IN (#{domain}) " + "AND DUE IS NOT NULL " + "GROUP BY WORKBASKET_KEY, (DAYS(DUE) - DAYS(CURRENT_TIMESTAMP)) " + "GROUP BY WORKBASKET_KEY, DATEDIFF('DAY', CURRENT_TIMESTAMP, DUE) " @@ -36,7 +37,8 @@ public interface TaskMonitorMapper { List getTaskCountOfWorkbasketsByWorkbasketsAndStates( @Param("workbaskets") List workbaskets, @Param("states") List states, - @Param("categories") List categories); + @Param("categories") List categories, + @Param("domains") List domains); @Select("