1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.to;
20
21 import javax.ws.rs.PathParam;
22 import org.apache.commons.lang3.builder.EqualsBuilder;
23 import org.apache.commons.lang3.builder.HashCodeBuilder;
24 import org.apache.syncope.common.lib.types.ImplementationEngine;
25
26 public class ImplementationTO implements EntityTO {
27
28 private static final long serialVersionUID = 2703397698393060586L;
29
30 private String key;
31
32 private ImplementationEngine engine;
33
34 private String type;
35
36 private String body;
37
38 @Override
39 public String getKey() {
40 return key;
41 }
42
43 @PathParam("key")
44 @Override
45 public void setKey(final String key) {
46 this.key = key;
47 }
48
49 public ImplementationEngine getEngine() {
50 return engine;
51 }
52
53 public void setEngine(final ImplementationEngine engine) {
54 this.engine = engine;
55 }
56
57 public String getType() {
58 return type;
59 }
60
61 @PathParam("type")
62 public void setType(final String type) {
63 this.type = type;
64 }
65
66 public String getBody() {
67 return body;
68 }
69
70 public void setBody(final String body) {
71 this.body = body;
72 }
73
74 @Override
75 public int hashCode() {
76 return new HashCodeBuilder().
77 append(key).
78 append(engine).
79 append(type).
80 append(body).
81 build();
82 }
83
84 @Override
85 public boolean equals(final Object obj) {
86 if (this == obj) {
87 return true;
88 }
89 if (obj == null) {
90 return false;
91 }
92 if (getClass() != obj.getClass()) {
93 return false;
94 }
95 final ImplementationTO other = (ImplementationTO) obj;
96 return new EqualsBuilder().
97 append(key, other.key).
98 append(engine, other.engine).
99 append(type, other.type).
100 append(body, other.body).
101 build();
102 }
103 }