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  @Deprecated(since = "4.0.0")
33  public final class ModelProblemCollectorRequest {
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          this.severity = Objects.requireNonNull(severity, "severity cannot be null");
48          this.version = Objects.requireNonNull(version, "version cannot be null");
49      }
50  
51      public Severity getSeverity() {
52          return severity;
53      }
54  
55      public Version getVersion() {
56          return version;
57      }
58  
59      public Exception getException() {
60          return exception;
61      }
62  
63      public ModelProblemCollectorRequest setException(Exception exception) {
64          this.exception = exception;
65          return this;
66      }
67  
68      public String getMessage() {
69          return message;
70      }
71  
72      public ModelProblemCollectorRequest setMessage(String message) {
73          this.message = message;
74          return this;
75      }
76  
77      public InputLocation getLocation() {
78          return location;
79      }
80  
81      public ModelProblemCollectorRequest setLocation(InputLocation location) {
82          this.location = location;
83          return this;
84      }
85  }