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 java.util.Objects;
23  
24  import org.apache.maven.model.InputLocation;
25  import org.apache.maven.model.building.ModelProblem.Severity;
26  import org.apache.maven.model.building.ModelProblem.Version;
27  
28  
29  
30  
31  
32  
33  public final class ModelProblemCollectorRequest
34  {
35  
36      private final ModelProblem.Severity severity;
37      private final ModelProblem.Version version;
38      private Exception exception;
39      private String message;
40      private InputLocation location;
41  
42      
43  
44  
45  
46  
47      public ModelProblemCollectorRequest( Severity severity, Version version )
48      {
49          this.severity = Objects.requireNonNull( severity, "severity cannot be null" );
50          this.version = Objects.requireNonNull( version, "version cannot be null" );
51      }
52  
53      public Severity getSeverity()
54      {
55          return severity;
56      }
57  
58      public Version getVersion()
59      {
60          return version;
61      }
62  
63      public Exception getException()
64      {
65          return exception;
66      }
67  
68      public ModelProblemCollectorRequest setException( Exception exception )
69      {
70          this.exception = exception;
71          return this;
72      }
73  
74      public String getMessage()
75      {
76          return message;
77      }
78  
79      public ModelProblemCollectorRequest setMessage( String message )
80      {
81          this.message = message;
82          return this;
83      }
84  
85      public InputLocation getLocation()
86      {
87          return location;
88      }
89  
90      public ModelProblemCollectorRequest setLocation( InputLocation location )
91      {
92          this.location = location;
93          return this;
94      }
95  }