1 package org.apache.maven.model.building;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.commons.lang3.Validate;
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
35 private final ModelProblem.Severity severity;
36 private final ModelProblem.Version version;
37 private Exception exception;
38 private String message;
39 private InputLocation location;
40
41
42
43
44
45
46 public ModelProblemCollectorRequest( Severity severity, Version version )
47 {
48 this.severity = Validate.notNull( severity, "severity cannot be null" );
49 this.version = Validate.notNull( version, "version cannot be null" );
50 }
51
52 public Severity getSeverity()
53 {
54 return severity;
55 }
56
57 public Version getVersion()
58 {
59 return version;
60 }
61
62 public Exception getException()
63 {
64 return exception;
65 }
66
67 public ModelProblemCollectorRequest setException( Exception exception )
68 {
69 this.exception = exception;
70 return this;
71 }
72
73 public String getMessage()
74 {
75 return message;
76 }
77
78 public ModelProblemCollectorRequest setMessage( String message )
79 {
80 this.message = message;
81 return this;
82 }
83
84 public InputLocation getLocation()
85 {
86 return location;
87 }
88
89 public ModelProblemCollectorRequest setLocation( InputLocation location )
90 {
91 this.location = location;
92 return this;
93 }
94 }