Skip to content

Commit 440085e

Browse files
committed
Support MI 4.6.0 server runtime
1 parent bb04ed9 commit 440085e

File tree

3 files changed

+146
-2
lines changed

3 files changed

+146
-2
lines changed

org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/inbound/conector/InboundConnectorHolder.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import java.util.HashMap;
4747
import java.util.List;
4848
import java.util.Map;
49+
import java.util.Set;
4950
import java.util.logging.Level;
5051
import java.util.logging.Logger;
5152

@@ -66,6 +67,11 @@ public class InboundConnectorHolder {
6667
private String projectRuntimeVersion;
6768
private String localInboundEndpointsListForCopilot;
6869

70+
private Set<String> FALLBACK_TO_440 = Set.of(
71+
Constant.MI_460_VERSION,
72+
Constant.MI_450_VERSION
73+
);
74+
6975
public InboundConnectorHolder() {
7076

7177
this.inboundConnectors = new HashMap<>();
@@ -85,14 +91,14 @@ public void init(String projectPath, String projectRuntimeVersion) {
8591
OverviewPageDetailsResponse pomDetailsResponse = new OverviewPageDetailsResponse();
8692
getPomDetails(projectPath, pomDetailsResponse);
8793
Node node = pomDetailsResponse.getPrimaryDetails().getRuntimeVersion();
88-
if (node != null && Constant.MI_450_VERSION.equals(node.getValue())) {
94+
if (node != null && FALLBACK_TO_440.contains(node.getValue())) {
8995
this.projectRuntimeVersion = node.getValue();
9096
} else {
9197
this.projectRuntimeVersion = projectRuntimeVersion;
9298
}
9399
this.tempFolderPath = System.getProperty("user.home") + File.separator + ".wso2-mi" + File.separator +
94100
Constant.INBOUND_CONNECTORS + File.separator + new File(projectPath).getName() + "_" + projectId;
95-
String referenceRuntime = Constant.MI_450_VERSION.equals(this.projectRuntimeVersion) ? Constant.MI_440_VERSION
101+
String referenceRuntime = FALLBACK_TO_440.contains(this.projectRuntimeVersion) ? Constant.MI_440_VERSION
96102
: this.projectRuntimeVersion;
97103
this.localInboundConnectors = Utils.getUISchemaMap("org/eclipse/lemminx/inbound-endpoints/"
98104
+ referenceRuntime.replace(".", StringUtils.EMPTY));

org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/utils/Constant.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ public class Constant {
575575
public static final String CONNECTOR_PATH = "connectorPath";
576576
public static final String MI_440_VERSION = "4.4.0";
577577
public static final String MI_450_VERSION = "4.5.0";
578+
public static final String MI_460_VERSION = "4.6.0";
578579
public static final String UI_SCHEMA_NAME = "UI_SCHEMA_NAME";
579580
public static final String SEQUENCE_NAME = "sequenceName";
580581
public static final String CAN_TRY_OUT = "canTryOut";
@@ -653,6 +654,7 @@ public class Constant {
653654
put("4.3.0", "4.3.0");
654655
put("4.4.0", "4.4.0");
655656
put("4.5.0", "4.4.0");
657+
put("4.6.0", "4.4.0");
656658
}};
657659

658660
static {
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"inbound-connector-data": [
3+
{
4+
"name": "HTTP",
5+
"id": "http",
6+
"type": "builtin-inbound-endpoint",
7+
"version": "1.0.0",
8+
"rank": 1,
9+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/http.zip",
10+
"description": "Inbuilt HTTP Event Listener",
11+
"icon": "http-inbound.gif",
12+
"icon_url": "https://mi-connectors.wso2.com/icons/http-inbound.gif"
13+
},
14+
{
15+
"name": "HTTPS",
16+
"id": "https",
17+
"type": "builtin-inbound-endpoint",
18+
"version": "1.0.0",
19+
"rank": 2,
20+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/https.zip",
21+
"description": "Inbuilt HTTPS Event Listener",
22+
"icon": "https-inbound.gif",
23+
"icon_url": "https://mi-connectors.wso2.com/icons/https-inbound.gif"
24+
},
25+
{
26+
"name": "JMS",
27+
"id": "jms",
28+
"type": "builtin-inbound-endpoint",
29+
"version": "1.0.0",
30+
"rank": 3,
31+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/jms.zip",
32+
"description": "Inbuilt JMS Event Listener",
33+
"icon": "jms-inbound.gif",
34+
"icon_url": "https://mi-connectors.wso2.com/icons/jms-inbound.gif"
35+
},
36+
{
37+
"name": "Websocket",
38+
"id": "ws",
39+
"type": "builtin-inbound-endpoint",
40+
"version": "1.0.0",
41+
"rank": 6,
42+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/ws.zip",
43+
"description": "Inbuilt Websocket Event Listener",
44+
"icon": "ws-inbound.gif",
45+
"icon_url": "https://mi-connectors.wso2.com/icons/ws-inbound.gif"
46+
},
47+
{
48+
"name": "Secure Websocket",
49+
"id": "wss",
50+
"type": "builtin-inbound-endpoint",
51+
"version": "1.0.0",
52+
"rank": 7,
53+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/wss.zip",
54+
"description": "Inbuilt Secure Websocket Event Listener",
55+
"icon": "wss-inbound.gif",
56+
"icon_url": "https://mi-connectors.wso2.com/icons/wss-inbound.gif"
57+
},
58+
{
59+
"name": "MQTT",
60+
"id": "mqtt",
61+
"type": "builtin-inbound-endpoint",
62+
"version": "1.0.0",
63+
"rank": 8,
64+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/mqtt.zip",
65+
"description": "Inbuilt MQTT Event Listener",
66+
"icon": "mqtt-inbound.gif",
67+
"icon_url": "https://mi-connectors.wso2.com/icons/mqtt-inbound.gif"
68+
},
69+
{
70+
"name": "HL7",
71+
"id": "hl7",
72+
"type": "builtin-inbound-endpoint",
73+
"version": "1.0.0",
74+
"rank": 9,
75+
"download_url": "https://github.com/wso2/integration-studio/raw/main/SamplesForVSCode/InbuiltInboundEndpoints/hl7.zip",
76+
"description": "Inbuilt HL7 Event Listener",
77+
"icon": "hl7-inbound.gif",
78+
"icon_url": "https://mi-connectors.wso2.com/icons/hl7-inbound.gif"
79+
},
80+
{
81+
"name": "File Event Listener",
82+
"id": "org.wso2.carbon.inbound.vfs.VFSConsumer",
83+
"type": "inbound-endpoint"
84+
},
85+
{
86+
"name": "Amazon Simple Queue Service (Inbound)",
87+
"id": "org.wso2.carbon.inbound.amazonsqs.AmazonSQSPollingConsumer",
88+
"type": "inbound-endpoint"
89+
},
90+
{
91+
"name": "ISO8583 (Inbound)",
92+
"id": "org.wso2.carbon.inbound.iso8583.listening.ISO8583MessageConsumer",
93+
"type": "inbound-endpoint"
94+
},
95+
{
96+
"name": "SMPP (Inbound)",
97+
"id": "org.wso2.carbon.inbound.smpp.SMPPListeningConsumer",
98+
"type": "inbound-endpoint"
99+
},
100+
{
101+
"name": "CDC (Inbound)",
102+
"id": "org.wso2.carbon.inbound.cdc.CDCPollingConsumer",
103+
"type": "inbound-endpoint"
104+
},
105+
{
106+
"name": "Kafka (Inbound)",
107+
"id": "org.wso2.carbon.inbound.kafka.KafkaMessageConsumer",
108+
"type": "inbound-endpoint"
109+
},
110+
{
111+
"name": "Salesforce (Inbound)",
112+
"id": "org.wso2.carbon.inbound.salesforce.poll.SalesforceStreamData",
113+
"type": "inbound-endpoint"
114+
},
115+
{
116+
"name": "Pulsar (Inbound)",
117+
"id": "org.wso2.integration.inbound.PulsarMessageConsumer",
118+
"type": "inbound-endpoint"
119+
},
120+
{
121+
"name": "Salesforce PubSub (Inbound)",
122+
"id": "org.wso2.carbon.inbound.sf.pubsub.SFPubSubInboundFactory",
123+
"type": "inbound-endpoint"
124+
},
125+
{
126+
"name": "Google PubSub (Inbound)",
127+
"id": "org.wso2.carbon.inbound.googlepubsub.GooglePubSubMessageConsumer",
128+
"type": "inbound-endpoint"
129+
},
130+
{
131+
"name": "RabbitMQ (Inbound)",
132+
"id": "org.wso2.carbon.inbound.rabbitmq.RabbitMQListener",
133+
"type": "inbound-endpoint"
134+
}
135+
]
136+
}

0 commit comments

Comments
 (0)