src/main/java/de/uapcore/lightpit/viewmodel/VersionInfo.java

changeset 184
e8eecee6aadf
parent 183
61669abf277f
child 185
5ec9fcfbdf9c
     1.1 --- a/src/main/java/de/uapcore/lightpit/viewmodel/VersionInfo.java	Sat Jan 23 14:47:59 2021 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,64 +0,0 @@
     1.4 -package de.uapcore.lightpit.viewmodel;
     1.5 -
     1.6 -import de.uapcore.lightpit.entities.Issue;
     1.7 -import de.uapcore.lightpit.entities.IssueSummary;
     1.8 -import de.uapcore.lightpit.entities.Version;
     1.9 -
    1.10 -import java.util.ArrayList;
    1.11 -import java.util.List;
    1.12 -
    1.13 -public class VersionInfo {
    1.14 -
    1.15 -    private final Version version;
    1.16 -
    1.17 -    private final IssueSummary reportedTotal = new IssueSummary();
    1.18 -    private final IssueSummary resolvedTotal = new IssueSummary();
    1.19 -
    1.20 -    private final List<Issue> reported = new ArrayList<>();
    1.21 -    private final List<Issue> resolved = new ArrayList<>();
    1.22 -
    1.23 -    public VersionInfo(Version version) {
    1.24 -        this.version = version;
    1.25 -    }
    1.26 -
    1.27 -    public Version getVersion() {
    1.28 -        return version;
    1.29 -    }
    1.30 -
    1.31 -    public void addReported(Issue issue) {
    1.32 -        reportedTotal.add(issue);
    1.33 -        reported.add(issue);
    1.34 -    }
    1.35 -
    1.36 -    public void addResolved(Issue issue) {
    1.37 -        resolvedTotal.add(issue);
    1.38 -        resolved.add(issue);
    1.39 -    }
    1.40 -
    1.41 -    public IssueSummary getReportedTotal() {
    1.42 -        return reportedTotal;
    1.43 -    }
    1.44 -
    1.45 -    public IssueSummary getResolvedTotal() {
    1.46 -        return resolvedTotal;
    1.47 -    }
    1.48 -
    1.49 -    public List<Issue> getReported() {
    1.50 -        return reported;
    1.51 -    }
    1.52 -
    1.53 -    public List<Issue> getResolved() {
    1.54 -        return resolved;
    1.55 -    }
    1.56 -
    1.57 -    public void collectIssues(List<Issue> issues) {
    1.58 -        for (Issue issue : issues) {
    1.59 -            if (issue.getAffectedVersions().contains(version)) {
    1.60 -                addReported(issue);
    1.61 -            }
    1.62 -            if (issue.getResolvedVersions().contains(version)) {
    1.63 -                addResolved(issue);
    1.64 -            }
    1.65 -        }
    1.66 -    }
    1.67 -}

mercurial