1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.model.building;
20
21 import java.util.Objects;
22
23 import org.apache.maven.model.InputLocation;
24 import org.apache.maven.model.building.ModelProblem.Severity;
25 import org.apache.maven.model.building.ModelProblem.Version;
26
27
28
29
30
31
32 public final class ModelProblemCollectorRequest {
33
34 private final ModelProblem.Severity severity;
35 private final ModelProblem.Version version;
36 private Exception exception;
37 private String message;
38 private InputLocation location;
39
40
41
42
43
44
45 public ModelProblemCollectorRequest(Severity severity, Version version) {
46 this.severity = Objects.requireNonNull(severity, "severity cannot be null");
47 this.version = Objects.requireNonNull(version, "version cannot be null");
48 }
49
50 public Severity getSeverity() {
51 return severity;
52 }
53
54 public Version getVersion() {
55 return version;
56 }
57
58 public Exception getException() {
59 return exception;
60 }
61
62 public ModelProblemCollectorRequest setException(Exception exception) {
63 this.exception = exception;
64 return this;
65 }
66
67 public String getMessage() {
68 return message;
69 }
70
71 public ModelProblemCollectorRequest setMessage(String message) {
72 this.message = message;
73 return this;
74 }
75
76 public InputLocation getLocation() {
77 return location;
78 }
79
80 public ModelProblemCollectorRequest setLocation(InputLocation location) {
81 this.location = location;
82 return this;
83 }
84 }