Skip to content

Commit 73de7fb

Browse files
committed
Updated with new release 1.6.3 release version
1 parent 4e801f5 commit 73de7fb

File tree

36 files changed

+586
-483
lines changed

36 files changed

+586
-483
lines changed

db/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>

demo-all/demo-all/cucumblan.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#This is a cucumblan.properties properties file
2-
#Mon Mar 28 00:52:17 CDT 2022
2+
#Tue Mar 29 00:45:49 CDT 2022
33
virtualan.data.heading=Rest-Get - Workflow;Multi-Run - Workflow;
44
virtualan.data.type=VIRTUALAN
55
service.api.ep=https\://live.virtualandemo.com/api

demo-all/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>

examples/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#This is a cucumblan-env.properties properties file
2-
#Mon Mar 28 00:52:58 CDT 2022
2+
#Tue Mar 29 00:47:02 CDT 2022
33
password=1password
44

execute-feature-file/LakesideMutual/Customer-Self-Service/DB/cucumblan.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#This is a cucumblan.properties properties file
2-
#Mon Mar 28 00:52:58 CDT 2022
2+
#Tue Mar 29 00:47:02 CDT 2022
33
css.cucumblan.jdbc.url=jdbc\:mysql\://microservices.virtualandemo.com\:3306/customerselfservice?allowPublicKeyRetrieval\=true&useSSL\=false
44
virtualan.data.heading=CSS-Accept-DB - Workflow;CSS-Reject-DB - Workflow;
55
virtualan.data.load=CSS-Accept-DB-0.json;CSS-Reject-DB-1.json;

execute-feature-file/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#This is a cucumblan-env.properties properties file
2-
#Mon Mar 28 00:52:55 CDT 2022
2+
#Tue Mar 29 00:46:54 CDT 2022
33
password=1password
44

generate-feature-file/LakesideMutual/Customer-Self-Service/DB/cucumblan.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#This is a cucumblan.properties properties file
2-
#Mon Mar 28 00:52:55 CDT 2022
2+
#Tue Mar 29 00:46:54 CDT 2022
33
css.cucumblan.jdbc.url=jdbc\:mysql\://microservices.virtualandemo.com\:3306/customerselfservice?useSSL\=false
44
virtualan.data.heading=CSS-Accept-DB - Workflow;CSS-Reject-DB - Workflow;
55
virtualan.data.load=CSS-Accept-DB-0.json;CSS-Reject-DB-1.json;

generate-feature-file/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>

graphql/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>8</maven.compiler.source>
1111
<maven.compiler.target>8</maven.compiler.target>
12-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
12+
<idaithalam.version>1.6.3</idaithalam.version>
1313
<mysql.version>8.0.13</mysql.version>
1414
<testng.ver>7.4.0</testng.ver>
1515
</properties>

rest-db-kafka-protobuf/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<junit.version>5.5.2</junit.version>
1111
<cucumber.version>6.7.0</cucumber.version>
1212
<virtualan.version>1.3.0</virtualan.version>
13-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
13+
<idaithalam.version>1.6.3</idaithalam.version>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
</properties>
1616
<description>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
package io.virtualan.cucumblan.message.typeimpl;
2+
3+
4+
import com.jayway.jsonpath.JsonPath;
5+
import java.util.Map.Entry;
6+
7+
public class JSONType implements
8+
io.virtualan.cucumblan.message.type.MessageType<String, String> {
9+
10+
private static final java.util.logging.Logger LOGGER = java.util.logging.Logger
11+
.getLogger(JSONType.class.getName());
12+
private static java.util.Properties jsonMessageTypeMapper = new java.util.Properties();
13+
14+
static {
15+
reload();
16+
}
17+
18+
private String type = "JSONType";
19+
private String id;
20+
private String body;
21+
22+
public JSONType() {
23+
}
24+
25+
public JSONType(String id, String body) {
26+
this.body = body;
27+
this.id = id;
28+
}
29+
30+
public static void reload() {
31+
try {
32+
java.io.InputStream stream = Thread.currentThread().getContextClassLoader()
33+
.getResourceAsStream("json-messagetype.properties");
34+
if (stream == null) {
35+
stream = io.virtualan.cucumblan.props.ApplicationConfiguration.class.getClassLoader()
36+
.getResourceAsStream("json-messagetype.properties");
37+
}
38+
if (stream != null) {
39+
jsonMessageTypeMapper.load(stream);
40+
} else {
41+
LOGGER.warning("unable to load json-messagetype.properties");
42+
}
43+
} catch (Exception var1) {
44+
LOGGER.warning("json-messagetype.properties not found");
45+
}
46+
47+
}
48+
49+
public String getType() {
50+
return this.type;
51+
}
52+
53+
public java.util.List<org.apache.kafka.common.header.Header> getHeaders() {
54+
return null;
55+
}
56+
57+
//Mandatory
58+
public String getId() {
59+
return this.id;
60+
}
61+
62+
public String getKey() {
63+
return this.id;
64+
}
65+
66+
public String getMessage() {
67+
return this.body;
68+
}
69+
70+
//Mandatory
71+
public org.json.JSONObject getMessageAsJson() {
72+
return new org.json.JSONObject(this.body);
73+
}
74+
75+
public io.virtualan.cucumblan.message.type.MessageType buildProducerMessage(Object messages,
76+
java.util.Map<String, Object> contextParam)
77+
throws io.virtualan.cucumblan.message.exception.MessageNotDefinedException {
78+
String message;
79+
try {
80+
org.json.JSONObject body;
81+
if (messages instanceof java.util.List) {
82+
message = (String) ((java.util.List) messages).stream()
83+
.collect(java.util.stream.Collectors.joining());
84+
body = new org.json.JSONObject(message);
85+
return buildMessageType(body.toString(), contextParam);
86+
} else {
87+
88+
message = io.virtualan.mapson.Mapson.buildMAPsonAsJson((java.util.Map) messages);
89+
body = new org.json.JSONObject(message);
90+
return buildMessageType(body.toString(), contextParam);
91+
}
92+
} catch (io.virtualan.mapson.exception.BadInputDataException | io.virtualan.cucumblan.message.exception.SkipMessageException exception) {
93+
throw new io.virtualan.cucumblan.message.exception.MessageNotDefinedException(
94+
exception.getMessage());
95+
}
96+
}
97+
98+
//Mandatory
99+
public io.virtualan.cucumblan.message.type.MessageType buildConsumerMessage(
100+
org.apache.kafka.clients.consumer.ConsumerRecord<String, String> record,
101+
java.util.Map<String, Object> contextParam)
102+
throws io.virtualan.cucumblan.message.exception.SkipMessageException {
103+
return buildMessageType(record.value(), contextParam);
104+
}
105+
106+
public String toString() {
107+
return "JSONMessageType{type='" + this.type + '\'' + ", id=" + this.id + ", body=" + this.body
108+
+ '}';
109+
}
110+
111+
public JSONType buildMessageType(String body, java.util.Map<String, Object> contextParam)
112+
throws io.virtualan.cucumblan.message.exception.SkipMessageException {
113+
if (jsonMessageTypeMapper != null && !jsonMessageTypeMapper.isEmpty()) {
114+
for (Entry entry : jsonMessageTypeMapper.entrySet()) {
115+
try {
116+
if (contextParam.get("EVENT_NAME") != null
117+
&& entry.getKey().toString()
118+
.equalsIgnoreCase(contextParam.get("EVENT_NAME").toString())) {
119+
String identifier = buildkey(body, entry.getValue().toString());
120+
if (identifier != null) {
121+
return new JSONType(identifier, body);
122+
}
123+
}
124+
} catch (Exception e) {
125+
}
126+
}
127+
}
128+
throw new io.virtualan.cucumblan.message.exception.SkipMessageException(body);
129+
}
130+
131+
private String buildkey(String body, String paths){
132+
StringBuilder key = new StringBuilder();
133+
for(String path : paths.split("(?<!\\\\),")) {
134+
String pathId = path.replace("\\\\,",",");
135+
Object identifier = JsonPath.read(body, pathId);
136+
if(identifier != null) {
137+
if (key.length() != 0) {
138+
key.append("_");
139+
}
140+
key.append(identifier.toString());
141+
}
142+
}
143+
return key.toString();
144+
}
145+
}

rest-db-kafka-protobuf/src/test/java/io/virtualan/cucumblan/standard/KafkaMessageAggregator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public Object responseEvaluator() {
1717
int count = 0;
1818
if(mapAggregator != null) {
1919
for (java.util.Map.Entry<String, Object> entry : mapAggregator.entrySet()) {
20-
io.virtualan.cucumblan.message.typeimpl.JSONMessageType jsonmsg = (io.virtualan.cucumblan.message.typeimpl.JSONMessageType) entry.getValue();
20+
io.virtualan.cucumblan.message.typeimpl.JSONType jsonmsg = (io.virtualan.cucumblan.message.typeimpl.JSONType) entry.getValue();
2121
if ("doggie".equals(jsonmsg.getMessageAsJson().getString("name"))) {
2222
count++;
2323
}

rest-db-kafka/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<properties>
99
<maven.compiler.source>8</maven.compiler.source>
1010
<maven.compiler.target>8</maven.compiler.target>
11-
<idaithalam.version>1.6.3-SNAPSHOT</idaithalam.version>
11+
<idaithalam.version>1.6.3</idaithalam.version>
1212
<testng.ver>7.4.0</testng.ver>
1313
</properties>
1414
<description>

0 commit comments

Comments
 (0)