Interface RecategorizationListManipulator


  • public interface RecategorizationListManipulator
    An RecategorizationListManipulator is used to manipulate the list of categories that can be selected as target for a recategorization of issues by an agent or a supervisor.
    Since:
    10.0.142
    • Method Detail

      • getFilterPredicate

        default java.util.function.Predicate<Category> getFilterPredicate​(IssueRecategorizationFilterContext context)
        The method allows to filter the list of all available categories, that are displayed to the recategorization dialog. The method getFilterPredicate will be called on all RecategorizationListManipulator after the invocation of getAdditionalCategories(IssueRecategorizationFilterContext). As a consequence of this other plugins can also filter the categories added by other plugins or themselves. A category will be hidden to the user if there is at least one Predicate provided by any RecategorizationListManipulator, that returns false for that category. Otherwise the category will be visible to the user (default).
        Parameters:
        context - the context with the current user and selected issues.
        Returns:
        a Predicate that selects the categories to be displayed. If no predicate is provided, there will be no filter applied by this plugin.
        Since:
        10.0.142
      • getAdditionalCategories

        default java.util.Set<Category> getAdditionalCategories​(IssueRecategorizationFilterContext context)
        The method provides a list of suitable categories as recategorization target for a set of issues and a user. The method getAdditionalCategories will always be called on all available plugins first. In a second step the method getFilterPredicate(IssueRecategorizationFilterContext) will be called to all RecategorizationListManipulator to let them filter the list of previously added categories.
        Parameters:
        context - the context with the current user and selected issues.
        Returns:
        a Set of categories available to be selected by the user as target category for the recategorization. The list of categories finally provided to the user will be sorted by the Category's displayName.
        Since:
        10.0.142