Skip to content

Commit 239e64f

Browse files
Update SDK POJOs to have Lombok annotations (#463)
moves all java sdk POJOs to lombok annotations. We will have @DaTa @builder @NoArgsConstructor @AllArgsConstructor Our goal is to not break current backward compatibility. We have added unit tests in a previous PR for all the accessors and constructors which are deleted as part of Lombokisation. This will be a base on which we will sync sdk POJOs with server POJOs.
1 parent c977085 commit 239e64f

File tree

85 files changed

+709
-4119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+709
-4119
lines changed

conductor-clients/java/conductor-java-sdk/conductor-client/src/main/java/com/netflix/conductor/common/metadata/Auditable.java

Lines changed: 9 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
*/
1313
package com.netflix.conductor.common.metadata;
1414

15+
import lombok.AccessLevel;
16+
import lombok.AllArgsConstructor;
17+
import lombok.Data;
18+
import lombok.NoArgsConstructor;
19+
20+
@Data
21+
@NoArgsConstructor
22+
@AllArgsConstructor(access = AccessLevel.PRIVATE)
1523
public abstract class Auditable {
1624

1725
private String ownerApp;
@@ -24,73 +32,11 @@ public abstract class Auditable {
2432

2533
private String updatedBy;
2634

27-
/**
28-
* @return the ownerApp
29-
*/
30-
public String getOwnerApp() {
31-
return ownerApp;
32-
}
33-
34-
/**
35-
* @param ownerApp the ownerApp to set
36-
*/
37-
public void setOwnerApp(String ownerApp) {
38-
this.ownerApp = ownerApp;
39-
}
40-
41-
/**
42-
* @return the createTime
43-
*/
4435
public Long getCreateTime() {
4536
return createTime == null ? 0 : createTime;
4637
}
4738

48-
/**
49-
* @param createTime the createTime to set
50-
*/
51-
public void setCreateTime(Long createTime) {
52-
this.createTime = createTime;
53-
}
54-
55-
/**
56-
* @return the updateTime
57-
*/
5839
public Long getUpdateTime() {
5940
return updateTime == null ? 0 : updateTime;
6041
}
61-
62-
/**
63-
* @param updateTime the updateTime to set
64-
*/
65-
public void setUpdateTime(Long updateTime) {
66-
this.updateTime = updateTime;
67-
}
68-
69-
/**
70-
* @return the createdBy
71-
*/
72-
public String getCreatedBy() {
73-
return createdBy;
74-
}
75-
76-
/**
77-
* @param createdBy the createdBy to set
78-
*/
79-
public void setCreatedBy(String createdBy) {
80-
this.createdBy = createdBy;
81-
}
82-
83-
/**
84-
* @return the updatedBy
85-
*/
86-
public String getUpdatedBy() {
87-
return updatedBy;
88-
}
89-
90-
/**
91-
* @param updatedBy the updatedBy to set
92-
*/
93-
public void setUpdatedBy(String updatedBy) {
94-
this.updatedBy = updatedBy;
95-
}
96-
}
42+
}

conductor-clients/java/conductor-java-sdk/conductor-client/src/main/java/com/netflix/conductor/common/metadata/SchemaDef.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ public enum Type {
4040
// Externalized schema definition (eg. via AVRO, Protobuf registry)
4141
// If using Orkes Schema registry, this points to the name of the schema in the registry
4242
private String externalRef;
43+
4344
}

conductor-clients/java/conductor-java-sdk/conductor-client/src/main/java/com/netflix/conductor/common/metadata/events/EventExecution.java

Lines changed: 7 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818

1919
import com.netflix.conductor.common.metadata.events.EventHandler.Action;
2020

21+
import lombok.*;
22+
23+
@Data
24+
@NoArgsConstructor
25+
@Builder
26+
@AllArgsConstructor(access = AccessLevel.PRIVATE)
2127
public class EventExecution {
2228

2329
public enum Status {
@@ -41,126 +47,11 @@ public enum Status {
4147

4248
private Map<String, Object> output = new HashMap<>();
4349

44-
public EventExecution() {
45-
}
46-
4750
public EventExecution(String id, String messageId) {
4851
this.id = id;
4952
this.messageId = messageId;
5053
}
5154

52-
/**
53-
* @return the id
54-
*/
55-
public String getId() {
56-
return id;
57-
}
58-
59-
/**
60-
* @param id the id to set
61-
*/
62-
public void setId(String id) {
63-
this.id = id;
64-
}
65-
66-
/**
67-
* @return the messageId
68-
*/
69-
public String getMessageId() {
70-
return messageId;
71-
}
72-
73-
/**
74-
* @param messageId the messageId to set
75-
*/
76-
public void setMessageId(String messageId) {
77-
this.messageId = messageId;
78-
}
79-
80-
/**
81-
* @return the name
82-
*/
83-
public String getName() {
84-
return name;
85-
}
86-
87-
/**
88-
* @param name the name to set
89-
*/
90-
public void setName(String name) {
91-
this.name = name;
92-
}
93-
94-
/**
95-
* @return the event
96-
*/
97-
public String getEvent() {
98-
return event;
99-
}
100-
101-
/**
102-
* @param event the event to set
103-
*/
104-
public void setEvent(String event) {
105-
this.event = event;
106-
}
107-
108-
/**
109-
* @return the created
110-
*/
111-
public long getCreated() {
112-
return created;
113-
}
114-
115-
/**
116-
* @param created the created to set
117-
*/
118-
public void setCreated(long created) {
119-
this.created = created;
120-
}
121-
122-
/**
123-
* @return the status
124-
*/
125-
public Status getStatus() {
126-
return status;
127-
}
128-
129-
/**
130-
* @param status the status to set
131-
*/
132-
public void setStatus(Status status) {
133-
this.status = status;
134-
}
135-
136-
/**
137-
* @return the action
138-
*/
139-
public Action.Type getAction() {
140-
return action;
141-
}
142-
143-
/**
144-
* @param action the action to set
145-
*/
146-
public void setAction(Action.Type action) {
147-
this.action = action;
148-
}
149-
150-
/**
151-
* @return the output
152-
*/
153-
public Map<String, Object> getOutput() {
154-
return output;
155-
}
156-
157-
/**
158-
* @param output the output to set
159-
*/
160-
public void setOutput(Map<String, Object> output) {
161-
this.output = output;
162-
}
163-
16455
public boolean equals(Object o) {
16556
if (this == o) {
16657
return true;
@@ -175,4 +66,4 @@ public boolean equals(Object o) {
17566
public int hashCode() {
17667
return Objects.hash(id, messageId, name, event, created, status, action, output);
17768
}
178-
}
69+
}

conductor-clients/java/conductor-java-sdk/conductor-client/src/main/java/com/netflix/conductor/common/metadata/events/EventHandler.java

Lines changed: 10 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,21 @@
1717
import java.util.List;
1818
import java.util.Map;
1919

20+
import lombok.*;
21+
2022
/**
2123
* Defines an event handler
2224
*/
25+
26+
@Data
27+
@NoArgsConstructor
28+
@Builder
29+
@AllArgsConstructor(access = AccessLevel.PRIVATE)
2330
public class EventHandler {
2431

32+
/**
33+
* the name MUST be unique within a conductor instance
34+
*/
2535
private String name;
2636

2737
private String event;
@@ -34,93 +44,6 @@ public class EventHandler {
3444

3545
private String evaluatorType;
3646

37-
public EventHandler() {
38-
}
39-
40-
/**
41-
* @return the name MUST be unique within a conductor instance
42-
*/
43-
public String getName() {
44-
return name;
45-
}
46-
47-
/**
48-
* @param name the name to set
49-
*/
50-
public void setName(String name) {
51-
this.name = name;
52-
}
53-
54-
/**
55-
* @return the event
56-
*/
57-
public String getEvent() {
58-
return event;
59-
}
60-
61-
/**
62-
* @param event the event to set
63-
*/
64-
public void setEvent(String event) {
65-
this.event = event;
66-
}
67-
68-
/**
69-
* @return the condition
70-
*/
71-
public String getCondition() {
72-
return condition;
73-
}
74-
75-
/**
76-
* @param condition the condition to set
77-
*/
78-
public void setCondition(String condition) {
79-
this.condition = condition;
80-
}
81-
82-
/**
83-
* @return the actions
84-
*/
85-
public List<Action> getActions() {
86-
return actions;
87-
}
88-
89-
/**
90-
* @param actions the actions to set
91-
*/
92-
public void setActions(List<Action> actions) {
93-
this.actions = actions;
94-
}
95-
96-
/**
97-
* @return the active
98-
*/
99-
public boolean isActive() {
100-
return active;
101-
}
102-
103-
/**
104-
* @param active if set to false, the event handler is deactivated
105-
*/
106-
public void setActive(boolean active) {
107-
this.active = active;
108-
}
109-
110-
/**
111-
* @return the evaluator type
112-
*/
113-
public String getEvaluatorType() {
114-
return evaluatorType;
115-
}
116-
117-
/**
118-
* @param evaluatorType the evaluatorType to set
119-
*/
120-
public void setEvaluatorType(String evaluatorType) {
121-
this.evaluatorType = evaluatorType;
122-
}
123-
12447
public static class Action {
12548

12649
public enum Type {

0 commit comments

Comments
 (0)