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