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

Sun, 21 Jun 2020 11:43:08 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 Jun 2020 11:43:08 +0200
changeset 89
c69d5cb11d6c
parent 86
0a658e53177c
child 99
a369fb1b3aa2
permissions
-rw-r--r--

fix: issue status Scheduled belongs to phase 0

86
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 package de.uapcore.lightpit.viewmodel;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 import de.uapcore.lightpit.entities.Project;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 import de.uapcore.lightpit.entities.Version;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 import de.uapcore.lightpit.entities.VersionStatus;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 import java.util.Collections;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 import java.util.List;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 public class VersionEditView {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 private final Version version;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 private List<Project> projects = Collections.emptyList();
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 private String errorText;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 public VersionEditView(Version version) {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 this.version = version;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 public Version getVersion() {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 return version;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 public List<Project> getProjects() {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 return projects;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 public void setProjects(List<Project> projects) {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 this.projects = projects;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 public VersionStatus[] getVersionStatus() {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 return VersionStatus.values();
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 public String getErrorText() {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 return errorText;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 public void setErrorText(String errorText) {
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 this.errorText = errorText;
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 }
0a658e53177c improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 }

mercurial