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 public final class ModelProblemCollectorRequest {
32
33 private final ModelProblem.Severity severity;
34 private final ModelProblem.Version version;
35 private Exception exception;
36 private String message;
37 private InputLocation location;
38
39
40
41
42
43
44 public ModelProblemCollectorRequest(Severity severity, Version version) {
45 this.severity = Objects.requireNonNull(severity, "severity cannot be null");
46 this.version = Objects.requireNonNull(version, "version cannot be null");
47 }
48
49 public Severity getSeverity() {
50 return severity;
51 }
52
53 public Version getVersion() {
54 return version;
55 }
56
57 public Exception getException() {
58 return exception;
59 }
60
61 public ModelProblemCollectorRequest setException(Exception exception) {
62 this.exception = exception;
63 return this;
64 }
65
66 public String getMessage() {
67 return message;
68 }
69
70 public ModelProblemCollectorRequest setMessage(String message) {
71 this.message = message;
72 return this;
73 }
74
75 public InputLocation getLocation() {
76 return location;
77 }
78
79 public ModelProblemCollectorRequest setLocation(InputLocation location) {
80 this.location = location;
81 return this;
82 }
83 }