1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.rundeck.api.domain;
17  
18  import java.io.Serializable;
19  
20  
21  
22  
23  
24  
25  public class RundeckAbort implements Serializable {
26  
27      private static final long serialVersionUID = 1L;
28  
29      private AbortStatus status;
30  
31      private RundeckExecution execution;
32  
33      public AbortStatus getStatus() {
34          return status;
35      }
36  
37      public void setStatus(AbortStatus status) {
38          this.status = status;
39      }
40  
41      public RundeckExecution getExecution() {
42          return execution;
43      }
44  
45      public void setExecution(RundeckExecution execution) {
46          this.execution = execution;
47      }
48  
49      @Override
50      public String toString() {
51          return "RundeckAbort [status=" + status + ", execution=" + execution + "]";
52      }
53  
54      @Override
55      public int hashCode() {
56          final int prime = 31;
57          int result = 1;
58          result = prime * result + ((execution == null) ? 0 : execution.hashCode());
59          result = prime * result + ((status == null) ? 0 : status.hashCode());
60          return result;
61      }
62  
63      @Override
64      public boolean equals(Object obj) {
65          if (this == obj)
66              return true;
67          if (obj == null)
68              return false;
69          if (getClass() != obj.getClass())
70              return false;
71          RundeckAbort other = (RundeckAbort) obj;
72          if (execution == null) {
73              if (other.execution != null)
74                  return false;
75          } else if (!execution.equals(other.execution))
76              return false;
77          if (status == null) {
78              if (other.status != null)
79                  return false;
80          } else if (!status.equals(other.status))
81              return false;
82          return true;
83      }
84  
85      
86  
87  
88      public static enum AbortStatus {
89          PENDING, FAILED, ABORTED;
90      }
91  
92  }