Refactor ReviewerConfig and ReviewerFilterSection
* Extract abstract class ReviewerFilter.
- Abstracts the Config from REST and reviewer-adding logic in
- Makes it more straight-forward to create ReviewerFilters in tests
* Introduce ReviewerFilterCollection class.
- Maintains the collection of ReviewerFilters found in the Config
object provided to the ReviewerFilterCollection.
- Handles adding and removing reviewers from a Config object through
it's own implementation of ReviewerFilter.
* Create new config package.
- Move ReviewerFilterCollection, ReviewersConfig and
ReviewersConfigIT into this new package for separation.
* Remove ReviewerConfig#forProject(Project.NameKey) creator.
- This created a ForProject with a Config "with inheritance" to
enable getting all ReviewerFilterSections with inheritance
from a ForProject.
Since ForProject is also a VersionedMetaData this Config was later
replaced if the ForProject was loaded. This meant that ForProjects
had different responsibilities and behavior depending on if they
were loaded or not.
- Replace this creator with new method:
with the sole responsibility of returning all inherited
In preparation of supporting CC.
Feature: Issue 12903
10 files changed