1 package org.rundeck.api.domain;
2
3 import java.io.Serializable;
4 import java.util.Date;
5 import java.util.Map;
6
7
8
9
10
11 public class RundeckOutputEntry implements Serializable {
12
13 private static final long serialVersionUID = 1L;
14
15 private String time = null;
16 private Date absoluteTime = null;
17
18 private RundeckLogLevel level = null;
19
20 private String message = null;
21
22 private String user = null;
23
24 private String command = null;
25
26 private String node = null;
27 private String type = null;
28
29 private Map<String,String> metadata;
30
31
32 public String getTime() {
33 return time;
34 }
35
36 public void setTime(String time) {
37 this.time = time;
38 }
39
40 public RundeckLogLevel getLevel() {
41 return level;
42 }
43
44 public void setLevel(RundeckLogLevel level) {
45 this.level = level;
46 }
47
48 public String getMessage() {
49 return message;
50 }
51
52 public void setMessage(String message) {
53 this.message = message;
54 }
55
56 public String getUser() {
57 return user;
58 }
59
60 public void setUser(String user) {
61 this.user = user;
62 }
63
64 public String getCommand() {
65 return command;
66 }
67
68 public void setCommand(String command) {
69 this.command = command;
70 }
71
72 public String getNode() {
73 return node;
74 }
75
76 public void setNode(String node) {
77 this.node = node;
78 }
79
80
81
82 @Override
83 public String toString() {
84 return "RundeckOutputEntry [time=" + time + ", level=" + level +
85 ", message=" + message + ", user=" + user
86 + ", command=" + command
87 + ", type=" + type
88 + ", metadata=" + metadata
89 + ", node=" + node + "]";
90 }
91
92 @Override
93 public int hashCode() {
94 final int prime = 31;
95 int result = 1;
96 result = prime * result + ((time == null) ? 0 : time.hashCode());
97 result = prime * result + ((level == null) ? 0 : level.hashCode());
98 result = prime * result + ((message == null) ? 0 : message.hashCode());
99 result = prime * result + ((user == null) ? 0 : user.hashCode());
100 result = prime * result + ((command == null) ? 0 : command.hashCode());
101 result = prime * result + ((node == null) ? 0 : node.hashCode());
102 result = prime * result + ((type == null) ? 0 : type.hashCode());
103 result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
104 return result;
105 }
106
107
108 @Override
109 public boolean equals(Object obj) {
110 if (this == obj)
111 return true;
112 if (obj == null)
113 return false;
114 if (getClass() != obj.getClass())
115 return false;
116 RundeckOutputEntry other = (RundeckOutputEntry) obj;
117 if (time == null) {
118 if (other.time != null)
119 return false;
120 } else if (!time.equals(other.time))
121 return false;
122 if (level == null) {
123 if (other.level != null)
124 return false;
125 } else if (!level.equals(other.level))
126 return false;
127 if (message == null) {
128 if (other.message != null)
129 return false;
130 } else if (!message.equals(other.message))
131 return false;
132 if (user == null) {
133 if (other.user != null)
134 return false;
135 } else if (!user.equals(other.user))
136 return false;
137 if (command == null) {
138 if (other.command != null)
139 return false;
140 } else if (!command.equals(other.command))
141 return false;
142 if (node == null) {
143 if (other.node != null)
144 return false;
145 } else if (!node.equals(other.node))
146 return false;
147 if (type == null) {
148 if (other.type != null)
149 return false;
150 } else if (!type.equals(other.type))
151 return false;
152 if (metadata == null) {
153 if (other.metadata != null)
154 return false;
155 } else if (!metadata.equals(other.metadata))
156 return false;
157 return true;
158 }
159
160
161
162
163 public String getType() {
164 return type;
165 }
166
167 public void setType(String type) {
168 this.type = type;
169 }
170
171 public Map<String, String> getMetadata() {
172 return metadata;
173 }
174
175 public void setMetadata(Map<String, String> metadata) {
176 this.metadata = metadata;
177 }
178
179 public Date getAbsoluteTime() {
180 return absoluteTime;
181 }
182
183 public void setAbsoluteTime(Date absoluteTime) {
184 this.absoluteTime = absoluteTime;
185 }
186
187
188 public static enum RundeckLogLevel {
189 SEVERE, ERROR, WARNING, INFO, NORMAL, DEBUG, CONFIG, VERBOSE, FINEST,;
190 }
191
192 }