Skip to content

Commit 6f0edbc

Browse files
committed
MODWRKFLOW-60: Use and support Java 25.
Update minimum Java version to 25. **Lombok** no longer works and it is easier to just completely remove **Lombok** rather than to deal with its problems. - Add all of the getters and setters. - Use the **Apache** logger instead of **Slf4j** because **Spring-Boot** already brings in the **Apache** logger. Rename the `isIterable()` to `getIterable()` for consistency. Add missing `Has*` and other such classes such that the components models all have an annotation enforced getter and setter via interface inheritance. Fix problems with newer Postgresql (17+) where the schema must be specified. - Expose the schema name via `DB_SCHEMA`. - The name includes the tenant name followed by the module name. - The old behavior used a schema name more like `diku_workflow_service` (tenant name plus `workflow_service`). - Ensure that the `public` is still in the schema search path.
1 parent 0a3c309 commit 6f0edbc

55 files changed

Lines changed: 1643 additions & 380 deletions

Some content is hidden

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

components/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
<groupId>org.springframework.boot</groupId>
3232
<artifactId>spring-boot-starter-data-rest</artifactId>
3333
</dependency>
34-
35-
<dependency>
36-
<groupId>org.projectlombok</groupId>
37-
<artifactId>lombok</artifactId>
38-
<scope>provided</scope>
39-
</dependency>
4034
</dependencies>
4135

4236
<build>

components/src/main/java/org/folio/rest/workflow/dto/Comparison.java

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
package org.folio.rest.workflow.dto;
22

33
import jakarta.validation.constraints.NotNull;
4-
import lombok.Getter;
5-
import lombok.Setter;
64

7-
@Getter
8-
@Setter
95
public class Comparison {
106

117
@NotNull
@@ -18,4 +14,32 @@ public Comparison() {
1814
super();
1915
}
2016

17+
/**
18+
* @return the sourceProperty
19+
*/
20+
public String getSourceProperty() {
21+
return sourceProperty;
22+
}
23+
24+
/**
25+
* @return the targetProperty
26+
*/
27+
public String getTargetProperty() {
28+
return targetProperty;
29+
}
30+
31+
/**
32+
* @param sourceProperty the sourceProperty to set
33+
*/
34+
public void setSourceProperty(String sourceProperty) {
35+
this.sourceProperty = sourceProperty;
36+
}
37+
38+
/**
39+
* @param targetProperty the targetProperty to set
40+
*/
41+
public void setTargetProperty(String targetProperty) {
42+
this.targetProperty = targetProperty;
43+
}
44+
2145
}

components/src/main/java/org/folio/rest/workflow/dto/Mapping.java

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
package org.folio.rest.workflow.dto;
22

33
import jakarta.validation.constraints.NotNull;
4-
import lombok.Getter;
5-
import lombok.Setter;
64

7-
@Getter
8-
@Setter
95
public class Mapping {
106

117
@NotNull
@@ -23,4 +19,46 @@ public Mapping() {
2319
multiple = false;
2420
}
2521

22+
/**
23+
* @return the toProperty
24+
*/
25+
public String getToProperty() {
26+
return toProperty;
27+
}
28+
29+
/**
30+
* @return the fromProperty
31+
*/
32+
public String getFromProperty() {
33+
return fromProperty;
34+
}
35+
36+
/**
37+
* @return the multiple
38+
*/
39+
public boolean isMultiple() {
40+
return multiple;
41+
}
42+
43+
/**
44+
* @param toProperty the toProperty to set
45+
*/
46+
public void setToProperty(String toProperty) {
47+
this.toProperty = toProperty;
48+
}
49+
50+
/**
51+
* @param fromProperty the fromProperty to set
52+
*/
53+
public void setFromProperty(String fromProperty) {
54+
this.fromProperty = fromProperty;
55+
}
56+
57+
/**
58+
* @param multiple the multiple to set
59+
*/
60+
public void setMultiple(boolean multiple) {
61+
this.multiple = multiple;
62+
}
63+
2664
}

components/src/main/java/org/folio/rest/workflow/dto/Request.java

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
package org.folio.rest.workflow.dto;
22

33
import jakarta.validation.constraints.NotNull;
4-
import lombok.Getter;
5-
import lombok.Setter;
64
import org.springframework.http.HttpMethod;
75
import org.springframework.http.MediaType;
86

9-
@Getter
10-
@Setter
117
public class Request {
128

139
@NotNull
@@ -38,4 +34,116 @@ public Request() {
3834
iterable = false;
3935
}
4036

37+
/**
38+
* @return the url
39+
*/
40+
public String getUrl() {
41+
return url;
42+
}
43+
44+
/**
45+
* @return the method
46+
*/
47+
public HttpMethod getMethod() {
48+
return method;
49+
}
50+
51+
/**
52+
* @return the contentType
53+
*/
54+
public String getContentType() {
55+
return contentType;
56+
}
57+
58+
/**
59+
* @return the accept
60+
*/
61+
public String getAccept() {
62+
return accept;
63+
}
64+
65+
/**
66+
* @return the bodyTemplate
67+
*/
68+
public String getBodyTemplate() {
69+
return bodyTemplate;
70+
}
71+
72+
/**
73+
* @return the iterable
74+
*/
75+
public boolean isIterable() {
76+
return iterable;
77+
}
78+
79+
/**
80+
* @return the iterableKey
81+
*/
82+
public String getIterableKey() {
83+
return iterableKey;
84+
}
85+
86+
/**
87+
* @return the responseKey
88+
*/
89+
public String getResponseKey() {
90+
return responseKey;
91+
}
92+
93+
/**
94+
* @param url the url to set
95+
*/
96+
public void setUrl(String url) {
97+
this.url = url;
98+
}
99+
100+
/**
101+
* @param method the method to set
102+
*/
103+
public void setMethod(HttpMethod method) {
104+
this.method = method;
105+
}
106+
107+
/**
108+
* @param contentType the contentType to set
109+
*/
110+
public void setContentType(String contentType) {
111+
this.contentType = contentType;
112+
}
113+
114+
/**
115+
* @param accept the accept to set
116+
*/
117+
public void setAccept(String accept) {
118+
this.accept = accept;
119+
}
120+
121+
/**
122+
* @param bodyTemplate the bodyTemplate to set
123+
*/
124+
public void setBodyTemplate(String bodyTemplate) {
125+
this.bodyTemplate = bodyTemplate;
126+
}
127+
128+
/**
129+
* @param iterable the iterable to set
130+
*/
131+
public void setIterable(boolean iterable) {
132+
this.iterable = iterable;
133+
}
134+
135+
/**
136+
* @param iterableKey the iterableKey to set
137+
*/
138+
public void setIterableKey(String iterableKey) {
139+
this.iterableKey = iterableKey;
140+
}
141+
142+
/**
143+
* @param responseKey the responseKey to set
144+
*/
145+
public void setResponseKey(String responseKey) {
146+
this.responseKey = responseKey;
147+
}
148+
41149
}

components/src/main/java/org/folio/rest/workflow/model/AbstractGateway.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,17 @@
99
import jakarta.persistence.PrePersist;
1010
import java.util.ArrayList;
1111
import java.util.List;
12-
import lombok.Getter;
13-
import lombok.Setter;
1412
import org.folio.rest.workflow.enums.Direction;
1513
import org.folio.rest.workflow.model.components.Gateway;
1614
import org.folio.rest.workflow.model.has.HasNodes;
1715

1816
@MappedSuperclass
1917
public abstract class AbstractGateway extends Node implements Gateway, HasNodes {
2018

21-
@Getter
22-
@Setter
2319
@Column(nullable = false)
2420
@Enumerated(EnumType.STRING)
2521
private Direction direction;
2622

27-
@Getter
28-
@Setter
2923
@OneToMany
3024
@OrderColumn
3125
private List<Node> nodes;
@@ -51,4 +45,24 @@ public void prePersist() {
5145
}
5246
}
5347

48+
@Override
49+
public Direction getDirection() {
50+
return direction;
51+
}
52+
53+
@Override
54+
public void setDirection(Direction direction) {
55+
this.direction = direction;
56+
}
57+
58+
@Override
59+
public List<Node> getNodes() {
60+
return nodes;
61+
}
62+
63+
@Override
64+
public void setNodes(List<Node> nodes) {
65+
this.nodes = nodes;
66+
}
67+
5468
}

components/src/main/java/org/folio/rest/workflow/model/AbstractProcess.java

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import jakarta.persistence.PrePersist;
88
import java.util.ArrayList;
99
import java.util.List;
10-
import lombok.Getter;
11-
import lombok.Setter;
1210
import org.folio.rest.workflow.model.has.HasAsync;
1311
import org.folio.rest.workflow.model.has.HasNodes;
1412
import org.hibernate.annotations.ColumnDefault;
@@ -21,20 +19,14 @@
2119
@MappedSuperclass
2220
public abstract class AbstractProcess extends Node implements HasAsync, HasNodes {
2321

24-
@Getter
25-
@Setter
2622
@Column(nullable = false)
2723
@ColumnDefault("false")
2824
private Boolean asyncAfter;
2925

30-
@Getter
31-
@Setter
3226
@Column(nullable = false)
3327
@ColumnDefault("false")
3428
private Boolean asyncBefore;
3529

36-
@Getter
37-
@Setter
3830
@OneToMany
3931
@OrderColumn
4032
private List<Node> nodes;
@@ -65,4 +57,34 @@ public void prePersist() {
6557
}
6658
}
6759

60+
@Override
61+
public List<Node> getNodes() {
62+
return nodes;
63+
}
64+
65+
@Override
66+
public void setNodes(List<Node> nodes) {
67+
this.nodes = nodes;
68+
}
69+
70+
@Override
71+
public Boolean getAsyncAfter() {
72+
return asyncAfter;
73+
}
74+
75+
@Override
76+
public Boolean getAsyncBefore() {
77+
return asyncBefore;
78+
}
79+
80+
@Override
81+
public void setAsyncAfter(Boolean asyncAfter) {
82+
this.asyncAfter = asyncAfter;
83+
}
84+
85+
@Override
86+
public void setAsyncBefore(Boolean asyncBefore) {
87+
this.asyncBefore = asyncBefore;
88+
}
89+
6890
}

0 commit comments

Comments
 (0)