Skip to content

Commit 96b5816

Browse files
committed
Added generator for communication.xml
1 parent d04537a commit 96b5816

17 files changed

+619
-38
lines changed
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
4-
<topic name="${TOPIC_NAME}" request="string" response="string">
5-
<handler name="${HANDLER_NAME}"
6-
type="${HANDLER_TYPE}"
7-
method="${HANDLER_METHOD}"/>
8-
</topic>
94
</config>

src/com/magento/idea/magento2plugin/actions/generation/data/QueueCommunicationData.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ public class QueueCommunicationData {
55
private String handlerName;
66
private String handlerType;
77
private String handlerMethod;
8+
private String moduleName;
89

910
public QueueCommunicationData(
1011
String topicName,
1112
String handlerName,
1213
String handlerType,
13-
String handlerMethod
14+
String handlerMethod,
15+
String moduleName
1416
) {
1517
this.topicName = topicName;
1618
this.handlerName = handlerName;
1719
this.handlerType = handlerType;
1820
this.handlerMethod = handlerMethod;
21+
this.moduleName = moduleName;
1922
}
2023

2124
public String getTopicName() {
@@ -33,4 +36,8 @@ public String getHandlerType() {
3336
public String getHandlerMethod() {
3437
return handlerMethod;
3538
}
39+
40+
public String getModuleName() {
41+
return moduleName;
42+
}
3643
}

src/com/magento/idea/magento2plugin/actions/generation/data/QueueConsumerData.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ public class QueueConsumerData {
66
private String consumerType;
77
private String maxMessages;
88
private String connectionName;
9+
private String moduleName;
910

1011
public QueueConsumerData(
1112
String consumerName,
1213
String queueName,
1314
String consumerType,
1415
String maxMessages,
15-
String connectionName
16+
String connectionName,
17+
String moduleName
1618
) {
1719
this.consumerName = consumerName;
1820
this.queueName = queueName;
1921
this.consumerType = consumerType;
2022
this.maxMessages = maxMessages;
2123
this.connectionName = connectionName;
24+
this.moduleName = moduleName;
2225
}
2326

2427
public String getConsumerName() {
@@ -40,4 +43,8 @@ public String getMaxMessages() {
4043
public String getConnectionName() {
4144
return connectionName;
4245
}
46+
47+
public String getModuleName() {
48+
return moduleName;
49+
}
4350
}

src/com/magento/idea/magento2plugin/actions/generation/data/QueuePublisherData.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ public class QueuePublisherData {
44
private String topicName;
55
private String connectionName;
66
private String exchangeName;
7+
private String moduleName;
78

8-
public QueuePublisherData(String topicName, String connectionName, String exchangeName) {
9+
public QueuePublisherData(
10+
String topicName,
11+
String connectionName,
12+
String exchangeName,
13+
String moduleName
14+
) {
915
this.topicName = topicName;
1016
this.connectionName = connectionName;
1117
this.exchangeName = exchangeName;
18+
this.moduleName = moduleName;
1219
}
1320

1421
public String getTopicName() {
@@ -22,4 +29,8 @@ public String getConnectionName() {
2229
public String getExchangeName() {
2330
return exchangeName;
2431
}
32+
33+
public String getModuleName() {
34+
return moduleName;
35+
}
2536
}

src/com/magento/idea/magento2plugin/actions/generation/data/QueueTopologyData.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ public class QueueTopologyData {
55
private String bindingId;
66
private String bindingTopic;
77
private String bindingQueue;
8+
private String moduleName;
89

9-
public QueueTopologyData(String exchangeName, String bindingId, String bindingTopic, String bindingQueue) {
10+
public QueueTopologyData(
11+
String exchangeName,
12+
String bindingId,
13+
String bindingTopic,
14+
String bindingQueue,
15+
String moduleName
16+
) {
1017
this.exchangeName = exchangeName;
1118
this.bindingId = bindingId;
1219
this.bindingTopic = bindingTopic;
1320
this.bindingQueue = bindingQueue;
21+
this.moduleName = moduleName;
1422
}
1523

1624
public String getExchangeName() {
@@ -28,4 +36,8 @@ public String getBindingTopic() {
2836
public String getBindingQueue() {
2937
return bindingQueue;
3038
}
39+
40+
public String getModuleName() {
41+
return moduleName;
42+
}
3143
}

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewMessageQueueDialog.form

Lines changed: 217 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,251 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.magento.idea.magento2plugin.actions.generation.dialog.NewMessageQueueDialog">
3-
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
4-
<margin top="0" left="0" bottom="0" right="0"/>
3+
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
4+
<margin top="10" left="10" bottom="10" right="10"/>
55
<constraints>
6-
<xy x="20" y="20" width="500" height="400"/>
6+
<xy x="70" y="43" width="419" height="573"/>
77
</constraints>
8-
<properties/>
8+
<properties>
9+
<opaque value="true"/>
10+
<preferredSize width="420" height="900"/>
11+
<requestFocusEnabled value="true"/>
12+
</properties>
913
<border type="none"/>
1014
<children>
11-
<grid id="a033f" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
15+
<grid id="90a70" layout-manager="GridLayoutManager" row-count="11" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
1216
<margin top="0" left="0" bottom="0" right="0"/>
1317
<constraints>
1418
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
1519
</constraints>
1620
<properties/>
1721
<border type="none"/>
1822
<children>
19-
<hspacer id="ef683">
23+
<component id="b0da4" class="javax.swing.JLabel">
2024
<constraints>
21-
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
25+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
26+
<preferred-size width="113" height="16"/>
27+
</grid>
28+
</constraints>
29+
<properties>
30+
<labelFor value=""/>
31+
<text value="Topic Name"/>
32+
</properties>
33+
</component>
34+
<component id="1f03b" class="javax.swing.JTextField" binding="topicName">
35+
<constraints>
36+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
37+
<preferred-size width="150" height="-1"/>
38+
</grid>
39+
</constraints>
40+
<properties/>
41+
<clientProperties>
42+
<html.disable class="java.lang.Boolean" value="true"/>
43+
</clientProperties>
44+
</component>
45+
<component id="29a9d" class="javax.swing.JTextField" binding="handlerName">
46+
<constraints>
47+
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
48+
<preferred-size width="150" height="-1"/>
49+
</grid>
50+
</constraints>
51+
<properties/>
52+
<clientProperties>
53+
<html.disable class="java.lang.Boolean" value="true"/>
54+
</clientProperties>
55+
</component>
56+
<component id="b5004" class="javax.swing.JLabel">
57+
<constraints>
58+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
59+
</constraints>
60+
<properties>
61+
<labelFor value="fdc52"/>
62+
<text value="Handler Name&#10;"/>
63+
</properties>
64+
<clientProperties>
65+
<html.disable class="java.lang.Boolean" value="true"/>
66+
</clientProperties>
67+
</component>
68+
<component id="c2a5" class="javax.swing.JLabel">
69+
<constraints>
70+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
71+
</constraints>
72+
<properties>
73+
<text value="Handler Type"/>
74+
</properties>
75+
</component>
76+
<component id="ddec2" class="javax.swing.JTextField" binding="handlerType">
77+
<constraints>
78+
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
79+
<preferred-size width="150" height="-1"/>
80+
</grid>
81+
</constraints>
82+
<properties/>
83+
</component>
84+
<component id="5c579" class="javax.swing.JLabel">
85+
<constraints>
86+
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
87+
</constraints>
88+
<properties>
89+
<text value="Consumer Name"/>
90+
</properties>
91+
</component>
92+
<component id="62069" class="javax.swing.JLabel">
93+
<constraints>
94+
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
95+
</constraints>
96+
<properties>
97+
<text value="Binding Topic"/>
98+
</properties>
99+
</component>
100+
<component id="77ae8" class="javax.swing.JLabel">
101+
<constraints>
102+
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
103+
</constraints>
104+
<properties>
105+
<text value="Consumer Type"/>
106+
</properties>
107+
</component>
108+
<component id="ee88a" class="javax.swing.JLabel">
109+
<constraints>
110+
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
111+
</constraints>
112+
<properties>
113+
<text value="Max Messages"/>
114+
</properties>
115+
</component>
116+
<component id="9fc09" class="javax.swing.JLabel">
117+
<constraints>
118+
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
119+
</constraints>
120+
<properties>
121+
<text value="Connection Name"/>
122+
</properties>
123+
</component>
124+
<component id="c4614" class="javax.swing.JLabel">
125+
<constraints>
126+
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
127+
</constraints>
128+
<properties>
129+
<text value="Exchange Name"/>
130+
</properties>
131+
</component>
132+
<component id="35f81" class="javax.swing.JLabel">
133+
<constraints>
134+
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
135+
</constraints>
136+
<properties>
137+
<text value="Binding ID"/>
138+
</properties>
139+
</component>
140+
<component id="6eaf2" class="javax.swing.JTextField" binding="consumerName">
141+
<constraints>
142+
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
143+
<preferred-size width="150" height="-1"/>
144+
</grid>
145+
</constraints>
146+
<properties/>
147+
</component>
148+
<component id="1fd1e" class="javax.swing.JTextField" binding="consumerType">
149+
<constraints>
150+
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
151+
<preferred-size width="150" height="-1"/>
152+
</grid>
153+
</constraints>
154+
<properties/>
155+
</component>
156+
<component id="2351b" class="javax.swing.JTextField" binding="maxMessages">
157+
<constraints>
158+
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
159+
<preferred-size width="150" height="-1"/>
160+
</grid>
161+
</constraints>
162+
<properties/>
163+
</component>
164+
<component id="19d67" class="javax.swing.JTextField" binding="connectionName">
165+
<constraints>
166+
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
167+
<preferred-size width="150" height="-1"/>
168+
</grid>
169+
</constraints>
170+
<properties/>
171+
</component>
172+
<component id="1b8cf" class="javax.swing.JTextField" binding="exchangeName">
173+
<constraints>
174+
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
175+
<preferred-size width="150" height="-1"/>
176+
</grid>
177+
</constraints>
178+
<properties/>
179+
</component>
180+
<component id="77307" class="javax.swing.JTextField" binding="bindingId">
181+
<constraints>
182+
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
183+
<preferred-size width="150" height="-1"/>
184+
</grid>
185+
</constraints>
186+
<properties/>
187+
</component>
188+
<component id="990f4" class="javax.swing.JTextField" binding="bindingTopic">
189+
<constraints>
190+
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
191+
<preferred-size width="150" height="-1"/>
192+
</grid>
193+
</constraints>
194+
<properties/>
195+
</component>
196+
<component id="7c3ab" class="javax.swing.JLabel">
197+
<constraints>
198+
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
199+
</constraints>
200+
<properties>
201+
<text value="Queue Name"/>
202+
</properties>
203+
</component>
204+
<component id="59ae9" class="javax.swing.JTextField" binding="queueName">
205+
<constraints>
206+
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
207+
<preferred-size width="150" height="-1"/>
208+
</grid>
209+
</constraints>
210+
<properties/>
211+
</component>
212+
</children>
213+
</grid>
214+
<grid id="9ad5" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
215+
<margin top="0" left="0" bottom="0" right="0"/>
216+
<constraints>
217+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
218+
</constraints>
219+
<properties/>
220+
<border type="none"/>
221+
<children>
222+
<hspacer id="4aa6d">
223+
<constraints>
224+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
22225
</constraints>
23226
</hspacer>
24-
<grid id="a3b36" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
227+
<grid id="f892c" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="false" hgap="-1" vgap="-1">
25228
<margin top="0" left="0" bottom="0" right="0"/>
26229
<constraints>
27-
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
230+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
28231
</constraints>
29232
<properties/>
30233
<border type="none"/>
31234
<children>
32-
<component id="628a4" class="javax.swing.JButton" binding="button1" default-binding="true">
235+
<component id="20801" class="javax.swing.JButton" binding="buttonOK">
33236
<constraints>
34237
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
35238
</constraints>
36239
<properties>
37-
<text value="Button"/>
240+
<text resource-bundle="magento2/common" key="common.ok"/>
38241
</properties>
39242
</component>
40-
<component id="60b51" class="javax.swing.JButton" binding="button2" default-binding="true">
243+
<component id="1b860" class="javax.swing.JButton" binding="buttonCancel">
41244
<constraints>
42-
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
245+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
43246
</constraints>
44247
<properties>
45-
<text value="Button"/>
248+
<text resource-bundle="magento2/common" key="common.cancel"/>
46249
</properties>
47250
</component>
48251
</children>

0 commit comments

Comments
 (0)