Sidebar-EIP.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. (function()
  2. {
  3. Sidebar.prototype.addEipPalette = function()
  4. {
  5. this.setCurrentSearchEntryLibrary('eip', 'eipMessage Construction');
  6. this.addEipMessageConstructionPalette();
  7. this.setCurrentSearchEntryLibrary('eip', 'eipMessage Routing');
  8. this.addEipMessageRoutingPalette();
  9. this.setCurrentSearchEntryLibrary('eip', 'eipMessage Transformation');
  10. this.addEipMessageTransformationPalette();
  11. this.setCurrentSearchEntryLibrary('eip', 'eipMessaging Channels');
  12. this.addEipMessagingChannelsPalette();
  13. this.setCurrentSearchEntryLibrary('eip', 'eipMessaging Endpoints');
  14. this.addEipMessagingEndpointsPalette();
  15. this.setCurrentSearchEntryLibrary('eip', 'eipMessaging Systems');
  16. this.addEipMessagingSystemsPalette();
  17. this.setCurrentSearchEntryLibrary('eip', 'eipSystem Management');
  18. this.addEipSystemManagementPalette();
  19. this.setCurrentSearchEntryLibrary();
  20. }
  21. // Adds EIP shapes
  22. Sidebar.prototype.addEipMessageConstructionPalette = function(expand)
  23. {
  24. var s = "strokeWidth=2;dashed=0;align=center;fontSize=8;shape=";
  25. var s2 = "strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;shape=mxgraph.eip.";
  26. var s3 = "strokeWidth=3;outlineConnect=0;dashed=0;align=center;fontSize=8;shape=mxgraph.eip.";
  27. var gn = 'mxgraph.eip';
  28. var dt = 'eip enterprise integration pattern message construction ';
  29. var sb = this;
  30. var fns = [
  31. this.createEdgeTemplateEntry('edgeStyle=none;html=1;strokeColor=#808080;endArrow=block;endSize=10;dashed=0;verticalAlign=bottom;strokeWidth=2;',
  32. 160, 0, '', 'Pipe', null, this.getTagsForStencil(gn, '', dt + 'pipe').join(' ')),
  33. this.createVertexTemplateEntry(s + 'rect;fillColor=#c0f5a9;verticalLabelPosition=bottom;verticalAlign=top;html=1;',
  34. 150, 90, '', 'Filter', null, null, this.getTagsForStencil(gn, '', dt + 'filter').join(' ')),
  35. this.addEntry(dt + 'command message', function()
  36. {
  37. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  38. bg1.vertex = true;
  39. var bg2 = new mxCell('C', new mxGeometry(16, 18, 12, 12), s + 'rect;fillColor=#FF8080;fontStyle=1;whiteSpace=wrap;html=1;');
  40. bg2.vertex = true;
  41. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  42. edge1.geometry.relative = true;
  43. edge1.edge = true;
  44. bg1.insertEdge(edge1, false);
  45. bg2.insertEdge(edge1, true);
  46. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Command Message');
  47. }),
  48. this.addDataEntry(dt + 'correlation identifier', 78, 30, 'Correlation Identifier',
  49. '7ZZNj9MwEIZ/Ta4oH/SD47a73RMSUg/A0TTT2Fo3EznuNuXXM46naYwpFC0UCUhVaWbsmTjPO3aSFMtd92hEI99iCTopHpJiaRCtt3bdErRO8lSVSXGf5HlK/yRfXRjN+tG0EQZqe01C7hOehd6Dj/hAa4+aA1BWsGYXjZVYYS30wzm6MLivS3AVU/KgU/bDyP7o7FcT59XlnTF4oECNtcssRSuHRGl39Pz3GZmtNfgES9Ro+kUU89T9hpH3qrSSRnKK+AW7VQYMWtybDYemPmSFqYCxTGJSfSJjegTcgTVHmmJAC6uew+qi9W41zDtDJoM5f5t58U8wn8fMZ3+O+esrmJ9JfdK4eQrp0OhK6ZDVmEhEb7V6QwgjpS6Q+5VMOPUdKqqYpx0T4I4/BlvilO+V45TxefFVlWz2vSpe7KhKL87wJFfpNfmxXrEGQWcLraqa7A1xBdJkscXartVnl+1kaaVonE33VU3rNsaW9L3c/qcR3kW8PjAWup9V8sBrdjP4uSSoStow9pJ+n0b87n4XQAMbG9Mb2j/aGGl/nerxcjL2R/O2/UXxg1QW1o3oT5YDvSrDnfkSJU4J06CrMz67bqDT7G/uc06YpDfDOY9wLv63/UVhprdqe3LPn7T+bTD+4v0C'),
  50. this.addEntry(dt + 'document message', function()
  51. {
  52. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  53. bg1.vertex = true;
  54. var bg2 = new mxCell('D', new mxGeometry(16, 18, 12, 12), s + 'rect;fillColor=#C7A0FF;fontStyle=1;whiteSpace=wrap;html=1;');
  55. bg2.vertex = true;
  56. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  57. edge1.geometry.relative = true;
  58. edge1.edge = true;
  59. bg1.insertEdge(edge1, false);
  60. bg2.insertEdge(edge1, true);
  61. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Document Message');
  62. }),
  63. this.addEntry(dt + 'event message', function()
  64. {
  65. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  66. bg1.vertex = true;
  67. var bg2 = new mxCell('E', new mxGeometry(16, 18, 12, 12), s + 'rect;fillColor=#83BEFF;fontStyle=1;whiteSpace=wrap;html=1;');
  68. bg2.vertex = true;
  69. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  70. edge1.geometry.relative = true;
  71. edge1.edge = true;
  72. bg1.insertEdge(edge1, false);
  73. bg2.insertEdge(edge1, true);
  74. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Event Message');
  75. }),
  76. this.createVertexTemplateEntry(s3 + 'messExp;html=1;verticalLabelPosition=bottom;verticalAlign=top',
  77. 48, 48, '', 'Message Expiration', null, null, this.getTagsForStencil(gn, '', dt + 'message expiration').join(' ')),
  78. this.addDataEntry(dt + 'message sequence', 60, 24, 'Message Sequence',
  79. '7ZbPb4MgFMf/Gu4KtvG6urWnJUt62Jnpm5KiGMSq++sHQlsM7bLDsmzZmjThfd8Pee+DRESyetxJ2laPogCOyAMimRRC2VU9ZsA5whErELlHGEf6j/D2hjeevVFLJTTqMwnYJhwp78EqVujUxJ2Q9/IIJjxGZANNcSelGLT5wkV+0FKlau68nZLiAJngQs65JM6ybRSdPc+sUJX2YFtpz97MM4i2pOibYn6KibZ7gKKERVud6GXupJWVFJUluE6TsPk50XW+A1GDkpMOkcCpYsdlddpZszzHuVTdMJ28gFawRnVe5Scj6IDR1Uv9keuFLXCyvJ1cpBnLdUTktyJah4hWPwRRgr8UURIgigNG4XgL2lXneVLOykavcz0Y0Gg2r6JRbvqpoVPR1qwl5Mp4GecexDTabtfZNbzR/DvVc9sxB2GomIJ9S2dag76AlufEdQRSwYhu3S032E3O6w7q4Hr2pApYWamldg2uR+hDAKsAQPiS/CEALuF0Lr+fxzrgQf554CT9Jh7avHxC2PvM/8J4Bw=='),
  80. this.createVertexTemplateEntry(s3 + 'retAddr;html=1;verticalLabelPosition=bottom;fillColor=#FFE040;verticalAlign=top;',
  81. 78, 48, '', 'Return Address', null, null, this.getTagsForStencil(gn, 'retAddr', dt + 'return address').join(' '))
  82. ];
  83. this.addPalette('eipMessage Construction', 'EIP / Message Construction', expand || false, mxUtils.bind(this, function(content)
  84. {
  85. for (var i = 0; i < fns.length; i++)
  86. {
  87. content.appendChild(fns[i](content));
  88. }
  89. }));
  90. };
  91. Sidebar.prototype.addEipMessageRoutingPalette = function(expand)
  92. {
  93. var s = "strokeWidth=2;dashed=0;align=center;fontSize=8;shape=rect;fillColor=#fffbc0;";
  94. var s2 = "html=1;strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;fillColor=#c0f5a9;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.";
  95. var s3 = "edgeStyle=none;endArrow=none;dashed=0;html=1;strokeWidth=2;";
  96. var gn = 'mxgraph.eip';
  97. var dt = 'eip enterprise integration pattern message routing ';
  98. var sb = this;
  99. var fns = [
  100. this.createVertexTemplateEntry(s2 + 'aggregator;',
  101. 150, 90, '', 'Aggregator', null, null, this.getTagsForStencil(gn, 'aggregator', dt + '').join(' ')),
  102. this.createVertexTemplateEntry(s2 + 'composed_message_processor;',
  103. 150, 90, '', 'Composed Message Processor', null, null, this.getTagsForStencil(gn, 'composed_message_processor', dt + '').join(' ')),
  104. this.createVertexTemplateEntry(s2 + 'content_based_router;',
  105. 150, 90, '', 'Content Based Router', null, null, this.getTagsForStencil(gn, 'content_based_router', dt + '').join(' ')),
  106. this.createVertexTemplateEntry(s2 + 'dynamic_router;',
  107. 150, 90, '', 'Dynamic Router', null, null, this.getTagsForStencil(gn, 'dynamic_router', dt + '').join(' ')),
  108. this.addDataEntry(dt + 'message broker', 120, 90, 'Message Broker',
  109. '5ZjJboMwEIafxneDWZJjQ9qcesqhZxcGjGpwZJytT1+DnQUpUZEqmYQiIWb+YcbMZySwEUmqw0rSDXsXGXBEXhFJpBDKWNUhAc6Rj8sMkSXyfaxP5L/diXpdFG+ohFoNSfBNwo7yLRjFCI06cis0Soov+CgzxbTgI7LIaMOgLYC1Q3lZ1NpO9YggtZCLWq3L7zZ7pt2G0U1rS0hVGy05TwQXsitO8jz/TNsyZpSrCO4OHbFPCFLB4W6XnWRbXIGoQMmjvsUmBLHJ2Nsm2sYjIzEoC3YqMjMabYxfnAtdCGrDQrwNlEwb6LFPygHQYNpAbcLctumebzhtvhZoGDgDGk0b6O0X1iHf+F/wPX2yLN/Yd8Z3NjLfFOchnTvmSyJnfOe/84WsgLV1a1HrywLq7EVKsb8oPeRMVXq8pXfGdj05pn5btAerEVuZQm/SFZUFqN6v4QCkEjhV5a5f/S+IPPwkjMiIjLwnYRSMyGjA8uYhGIUjMhqwYnkIRtGIjAYsQh6CUeyMkXYvuxRdrLeJ8QM='),
  110. this.createVertexTemplateEntry(s2 + 'message_filter;',
  111. 150, 90, '', 'Message Filter', null, null, this.getTagsForStencil(gn, 'message_filter', dt + '').join(' ')),
  112. this.createVertexTemplateEntry(s2 + 'process_manager;',
  113. 150, 90, '', 'Process Manager', null, null, this.getTagsForStencil(gn, 'process_manager', dt + '').join(' ')),
  114. this.createVertexTemplateEntry(s2 + 'recipient_list;',
  115. 150, 90, '', 'Recipient List', null, null, this.getTagsForStencil(gn, 'recipient_list', dt + '').join(' ')),
  116. this.createVertexTemplateEntry(s2 + 'resequencer;',
  117. 150, 90, '', 'Resequencer', null, null, this.getTagsForStencil(gn, 'resequencer', dt + '').join(' ')),
  118. this.createVertexTemplateEntry(s2 + 'routing_slip;',
  119. 150, 90, '', 'Routing Slip', null, null, this.getTagsForStencil(gn, 'routing_slip', dt + '').join(' ')),
  120. this.createVertexTemplateEntry(s2 + 'splitter;',
  121. 150, 90, '', 'Splitter', null, null, this.getTagsForStencil(gn, 'splitter', dt + '').join(' '))
  122. ];
  123. this.addPalette('eipMessage Routing', 'EIP / Message Routing', expand || false, mxUtils.bind(this, function(content)
  124. {
  125. for (var i = 0; i < fns.length; i++)
  126. {
  127. content.appendChild(fns[i](content));
  128. }
  129. }));
  130. };
  131. Sidebar.prototype.addEipMessageTransformationPalette = function(expand)
  132. {
  133. var s = "html=1;strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;fillColor=#c0f5a9;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.";
  134. var gn = 'mxgraph.eip';
  135. var dt = 'eip enterprise integration pattern message transformation ';
  136. this.addPaletteFunctions('eipMessage Transformation', 'EIP / Message Transformation', false,
  137. [
  138. this.createVertexTemplateEntry(s + 'claim_check;',
  139. 150, 90, '', 'Claim Check', null, null, this.getTagsForStencil(gn, 'claim_check', dt + '').join(' ')),
  140. this.createVertexTemplateEntry(s + 'content_enricher;',
  141. 150, 90, '', 'Content Enricher', null, null, this.getTagsForStencil(gn, 'content_enricher', dt + '').join(' ')),
  142. this.createVertexTemplateEntry(s + 'content_filter;',
  143. 150, 90, '', 'Content Filter', null, null, this.getTagsForStencil(gn, 'content_filter', dt + '').join(' ')),
  144. this.createVertexTemplateEntry(s + 'envelope_wrapper;',
  145. 150, 90, '', 'Envelope Wrapper', null, null, this.getTagsForStencil(gn, 'envelope_wrapper', dt + '').join(' ')),
  146. this.createVertexTemplateEntry(s + 'normalizer;',
  147. 150, 90, '', 'Normalizer', null, null, this.getTagsForStencil(gn, 'normalizer', dt + '').join(' '))
  148. ]);
  149. };
  150. Sidebar.prototype.addEipMessagingChannelsPalette = function(expand)
  151. {
  152. var s = "strokeWidth=2;dashed=0;align=center;fontSize=8;html=1;shape=";
  153. var s2 = "strokeWidth=2;outlineConnect=0;dashed=0;align=center;html=1;fontSize=8;shape=mxgraph.eip.";
  154. var s3 = "strokeWidth=1;outlineConnect=0;dashed=0;align=center;html=1;fontSize=8;shape=mxgraph.eip.";
  155. var gn = 'mxgraph.eip';
  156. var dt = 'eip enterprise integration pattern messaging channel message ';
  157. var sb = this;
  158. var fns = [
  159. this.createEdgeTemplateEntry('edgeStyle=none;html=1;strokeColor=#808080;endArrow=block;endSize=10;dashed=0;verticalAlign=bottom;strokeWidth=2;',
  160. 160, 0, '', 'Point to Point Channel', null, this.getTagsForStencil(gn, '', dt + 'point').join(' ')),
  161. this.addDataEntry(dt + 'publish subscribe', 80, 160, 'Publish Subscribe Channel',
  162. '7ZbBbsIwDIafJvfQMMR1FMYJaRKHnbPWayvSGLmBwZ5+bhNKYaAxDTihqlL8O3aS72/VChWXmynpZT7DFIxQE6FiQnR+VG5iMEZEskiFGosoknyL6OVMttdk5VITWHdJQeQL1tqswCteqNzWBKFyhAt4K1KXsxAJNUp1lUPdQHKgTZFZHie8IhALH2jdvPiqq4cc5q7kU417PKxyvaxlgoQ3NwpLAznYnN1+I4W9TwFLcLTlKaGg708nt2FyOK3UlReytmLPgAcBw2kk6nckhCubtgTAps9E+MmhRQteCQR68phXl0dDNkaD1PRVQ1lfbabL3O8B0gwOUDlNGbgDLy+gR2C0K9aHrU4xC6WvWHDHH9R3FRWuKIEw6Qh0u+pF7Pt/Zs9A5iGJ5HLM0Goz2atdd94NJou72uPJ3Mue3VswOPLHPyTX8Ofp4c/1Xp/b2zV42PV/u4a3sovD/YfeT+/+B3wD'),
  163. this.createVertexTemplateEntry(s2 + 'channel_adapter;fillColor=#9ddbef;',
  164. 45, 90, '', 'Channel Adapter', null, null, this.getTagsForStencil(gn, 'channel_adapter', dt + '').join(' ')),
  165. this.createVertexTemplateEntry(s3 + 'messageChannel;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;',
  166. 100, 20, '', 'Message Channel', null, null, this.getTagsForStencil(gn, 'messageChannel', dt + '').join(' ')),
  167. this.createVertexTemplateEntry(s3 + 'dataChannel;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;',
  168. 100, 20, '', 'Datatype Channel', null, null, this.getTagsForStencil(gn, 'dataChannel', dt + '').join(' ')),
  169. this.createVertexTemplateEntry(s3 + 'deadLetterChannel;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;',
  170. 100, 20, '', 'Dead Letter Channel', null, null, this.getTagsForStencil(gn, 'deadLetterChannel', dt + '').join(' ')),
  171. this.createVertexTemplateEntry(s3 + 'invalidMessageChannel;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;',
  172. 100, 20, '', 'Invalid Message Channel', null, null, this.getTagsForStencil(gn, 'invalidMessageChannel', dt + '').join(' ')),
  173. this.createVertexTemplateEntry(s2 + 'messaging_bridge;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#c0f5a9;',
  174. 150, 90, '', 'Messaging Bridge', null, null, this.getTagsForStencil(gn, 'messaging_bridge', dt + '').join(' ')),
  175. this.addDataEntry(dt + 'message bus', 120, 140, 'Message Bus',
  176. '7ZbPb8IgFMf/Gq6Gwma8rtV5WrLEw84ob4VISwOodX/9oLBq/ZF5MJ5s0+S9L7xX+H5KUkSLqp0b1ogPzUEhOkO0MFq7GFVtAUohgiVHdIoIwf5B5P3KaNaN4oYZqN0tBSQWbJnaQFSiYN1eJcE6o9fwJbkTXiCI5lEptNKmm0Jxd/kRzqyA0DokTMmy9vHKrwX8zFy4ym9wmvnwW9duIX/CKyaho2BNiKu2DFaMQDajCqxlJRSC1XUwJk9LBeOgvbrdTkp7nYOuwJm9n7KPo+PoBt6l3YSC5BAWIEuRuvxpzMa87DsdvPRBsvOytfR/a4GXsEgpqKXezQ5Cfu670Zua9/ZCzd+M0TufLpVerbsSZtxFMXmdpcLjdMDsCNEZ5QkOdw8iLH6Awb+nBDf4rm4gY0AxJ7fDVpd8T6WfWvqOBLdDoglw9nJCzuqNWUEqOoHXr+Imni9Png/geXry7sfv9cnvgefx/vzGT34P4JfhewH06eE/Jk4//s35BQ==')
  177. ];
  178. this.addPalette('eipMessaging Channels', 'EIP / Messaging Channels', expand || false, mxUtils.bind(this, function(content)
  179. {
  180. for (var i = 0; i < fns.length; i++)
  181. {
  182. content.appendChild(fns[i](content));
  183. }
  184. }));
  185. };
  186. Sidebar.prototype.addEipMessagingEndpointsPalette = function(expand)
  187. {
  188. var s = "dashed=0;outlineConnect=0;strokeWidth=2;html=1;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.";
  189. var s2 = 'fillColor=#c0f5a9;' + s;
  190. var gn = 'mxgraph.eip';
  191. var dt = 'eip enterprise integration pattern messaging endpoint ';
  192. this.addPaletteFunctions('eipMessaging Endpoints', 'EIP / Messaging Endpoints', false,
  193. [
  194. this.createVertexTemplateEntry(s2 + 'competing_consumers;',
  195. 150, 90, '', 'Competing Consumers', null, null, this.getTagsForStencil(gn, 'competing_consumers', dt + '').join(' ')),
  196. this.createVertexTemplateEntry(s + 'durable_subscriber;fillColor=#a0a0a0;',
  197. 30, 35, '', 'Durable Subscriber', null, null, this.getTagsForStencil(gn, 'durable_subscriber', dt + '').join(' ')),
  198. this.createVertexTemplateEntry(s2 + 'event_driven_consumer;',
  199. 150, 90, '', 'Event Driven Consumer', null, null, this.getTagsForStencil(gn, 'event_driven_consumer', dt + '').join(' ')),
  200. this.createVertexTemplateEntry(s2 + 'message_dispatcher;',
  201. 150, 90, '', 'Message Dispatcher', null, null, this.getTagsForStencil(gn, 'message_dispatcher', dt + '').join(' ')),
  202. this.createVertexTemplateEntry(s2 + 'messaging_gateway;',
  203. 150, 90, '', 'Messaging Gateway', null, null, this.getTagsForStencil(gn, 'messaging_gateway', dt + '').join(' ')),
  204. this.createVertexTemplateEntry(s2 + 'polling_consumer;',
  205. 150, 90, '', 'Polling Consumer', null, null, this.getTagsForStencil(gn, 'polling_consumer', dt + '').join(' ')),
  206. this.createVertexTemplateEntry(s2 + 'selective_consumer;',
  207. 150, 90, '', 'Selective Consumer', null, null, this.getTagsForStencil(gn, 'selective_consumer', dt + '').join(' ')),
  208. this.createVertexTemplateEntry(s2 + 'service_activator;',
  209. 150, 90, '', 'Service Activator', null, null, this.getTagsForStencil(gn, 'service_activator', dt + '').join(' ')),
  210. this.createVertexTemplateEntry(s2 + 'transactional_client;',
  211. 150, 90, '', 'Transactional Client', null, null, this.getTagsForStencil(gn, 'transactional_client', dt + '').join(' '))
  212. ]);
  213. };
  214. Sidebar.prototype.addEipMessagingSystemsPalette = function(expand)
  215. {
  216. var s = "strokeWidth=2;dashed=0;align=center;fontSize=8;shape=";
  217. var s2 = "html=1;strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;shape=mxgraph.eip.";
  218. var s3 = "html=1;strokeWidth=1;dashed=0;align=center;fontSize=8;shape=";
  219. var s4 = "strokeWidth=1;outlineConnect=0;dashed=0;align=center;fontSize=8;shape=mxgraph.eip.";
  220. var gn = 'mxgraph.eip';
  221. var dt = 'eip enterprise integration pattern messaging system ';
  222. var sb = this;
  223. var fns = [
  224. this.createVertexTemplateEntry(s2 + 'content_based_router;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#c0f5a9;',
  225. 150, 90, '', 'Message Router', null, null, this.getTagsForStencil(gn, 'content_based_router', dt + '').join(' ')),
  226. this.createVertexTemplateEntry(s4 + 'messageChannel;html=1;verticalLabelPosition=bottom;verticalAlign=top;',
  227. 100, 20, '', 'Message Channel', null, null, this.getTagsForStencil(gn, 'messageChannel', dt + '').join(' ')),
  228. this.addEntry(dt + 'message endpoint', function()
  229. {
  230. var bg1 = new mxCell('', new mxGeometry(0, 0, 150, 90), s + 'rect;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#c0f5a9;html=1;');
  231. bg1.vertex = true;
  232. var bg2 = new mxCell('', new mxGeometry(85, 25, 40, 40), s3 + 'rect;');
  233. bg2.vertex = true;
  234. bg1.insert(bg2);
  235. return sb.createVertexTemplateFromCells([bg1], bg1.geometry.width, bg1.geometry.height, 'Message Endpoint');
  236. }),
  237. this.addEntry(dt + 'message endpoint', function()
  238. {
  239. var bg1 = new mxCell('', new mxGeometry(0, 0, 150, 90), s + 'rect;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#c0f5a9;html=1;');
  240. bg1.vertex = true;
  241. var bg2 = new mxCell('', new mxGeometry(25, 25, 40, 40), s3 + 'rect');
  242. bg2.vertex = true;
  243. bg1.insert(bg2);
  244. return sb.createVertexTemplateFromCells([bg1], bg1.geometry.width, bg1.geometry.height, 'Message Endpoint');
  245. }),
  246. this.addDataEntry(dt + 'message endpoint', 400, 90, 'Message Endpoint',
  247. 'zVZNb4JAEP013NcFGj0qWi9t0sRDzyuMsHFhyDJ+9dd3F1aFiK0mNhVCMvNmZj/emwU8P8r3cy3K7B0TUJ4/8/xII1Jj5fsIlPI4k4nnTz3OmXk8/nolOqijrBQaCrqlgDcFW6E20CANUNFBOaAijWv4lAllBuCeP0lElYEdgBlHKJkWxo7NjKANsMKCFvLLVg+NW2WitLaGmGxUKhWhQl0P7sdsFYqRTatnaUVYfZnIFjTJWKg3sQT1gZUkiXbCJRJh3koYu5UQlgbNKDdsTgfGdHs0abC/ylMNOZLmgDmQPpiUndu3zQgbLlkGMs1c2chhomr89FR6Zt0Yjvh+Efx7RRg8VoRVfT2DCLxfBFfAw6bi0HVbEgU9CgUPUCh4/mPyoH4/Uc0uyP2z/g+fv//vZTf4kd3hvzXyy+9UQ5LCwrmglribnYHJZZdr3BTJSQgokrHWuLOvBoXxui4Rmo5ggQUcMafPwNW13Y64Le4vBBoye/curNmY3U1HpQo3OobOi9csJgXq9OINJ0WDEiS33dHv0Ma45+98Hev8BnwD'),
  248. this.addDataEntry(dt + 'message', 28, 48, 'Message',
  249. '5ZVNb8IwDIZ/Ta9TaEcFx1E+Tjtx2HaMqNtES5MqNbTs1y9pwkdFu01iY5MGQrJfx8F57DZBlBTNStOSPaoURBAtgijRSqGziiYBIYKQ8DSI5kEYEvMLwuVAdNRGSUk1SPxKQugSdlRswSlOqHAvvABpDmvvKo1M5UpSsTipM622MgW7IzEeNByfz+wXa9+NrSfTB61VbQSppM1MacWOiQwLc/75yJgVavUKiRJKt0VEE2K/x8gTT5GZSGgUV7CtssOgUlu98dLYSUh1Dh7L/SWpNtFjWoEqAPXeLNEgKPJdd3daOTc/rjtBNobn3M88+hfM4z/F/P5z5pen7JCigufS2BtTOxhCs0xJXPM3mz2xkBgtrW3+l5eVBZ1xIYZxHiK+K74+0AjN4LM8QKv2NdsV/lwMeM6wq13Db3wzfho22AdvuYyTvikl7eewny9n1B3tmnGEdUnb2azNy/ZK4IcEP+N7706ce4N2xL/cjiybTsnlLH/Ujr4enLXo+9sRxT/VDuOebug21rnA3wE='),
  250. this.addEntry(dt + 'message', function()
  251. {
  252. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  253. bg1.vertex = true;
  254. var bg2 = new mxCell('', new mxGeometry(16, 18, 12, 12), s + 'rect;fillColor=#80FF6C;fontStyle=1;whiteSpace=wrap;html=1;');
  255. bg2.vertex = true;
  256. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  257. edge1.geometry.relative = true;
  258. edge1.edge = true;
  259. bg1.insertEdge(edge1, false);
  260. bg2.insertEdge(edge1, true);
  261. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Message');
  262. }),
  263. this.addDataEntry(dt + 'message', 28, 48, 'Message',
  264. 'vZTBboMwDIafhutEoZva40q7nnbqYdsxKoZECzEKbqF7+jkkbYcY2qROAyHZv/MH5yMkSrOq21pRy2fMQUfpJkozi0g+qroMtI6SWOVRuo6SJOYnSp4mqrO+GtfCgqHfGBJvOAp9AK94oaGTDgLkJexCipYklmiE3lzVlcWDycHNGHMGnaLXL/Gbi+/uXWbyR2uxZcGgcc5cNPJilFTx+tczDhuy+A4ZarR9E+kidvel8qJyklxJWPENuy4HDBo82H2Q5l4iYUsIWNIxqd4YMG0BKyB74iEWtCB1HM4uGp+Wl3FXyBwEzt8zT39mPl7lgJTQqjQc77l3YEKrAg3t1IdzLxwkKWoX83tV3TjQhdJ6Gue5Er5K6A8sQTe5ryZotaFnNyKsS4IqJQ21W/jN/42fhT2N4RXFchmP4XEl7q/zfKGd2XBrt1IR7GrR782Wf/wbgZ8ND95xCunCp3//OTi9Hk99bXB6fQI='),
  265. this.addEntry(dt + 'message', function()
  266. {
  267. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  268. bg1.vertex = true;
  269. var bg2 = new mxCell('', new mxGeometry(16, 18, 12, 12), s2 + 'message_1;fillColor=#ff5500;fontStyle=1;whiteSpace=wrap;html=1;');
  270. bg2.vertex = true;
  271. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  272. edge1.geometry.relative = true;
  273. edge1.edge = true;
  274. bg1.insertEdge(edge1, false);
  275. bg2.insertEdge(edge1, true);
  276. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Message');
  277. }),
  278. this.addEntry(dt + 'message', function()
  279. {
  280. var bg1 = new mxCell('', new mxGeometry(0, 0, 12, 12), s + 'ellipse;fillColor=#808080;strokeColor=none;');
  281. bg1.vertex = true;
  282. var bg2 = new mxCell('', new mxGeometry(16, 18, 12, 12), s2 + 'message_2;fillColor=#00cc00;fontStyle=1;whiteSpace=wrap;html=1;');
  283. bg2.vertex = true;
  284. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;strokeColor=#808080;strokeWidth=2;');
  285. edge1.geometry.relative = true;
  286. edge1.edge = true;
  287. bg1.insertEdge(edge1, false);
  288. bg2.insertEdge(edge1, true);
  289. return sb.createVertexTemplateFromCells([edge1, bg1, bg2], 28, 30, 'Message');
  290. }),
  291. this.createVertexTemplateEntry(s2 + 'message_translator;fillColor=#c0f5a9;verticalLabelPosition=bottom;verticalAlign=top;',
  292. 150, 90, '', 'Message-Translator', null, null, this.getTagsForStencil(gn, 'message_translator', dt + '').join(' '))
  293. ];
  294. this.addPalette('eipMessaging Systems', 'EIP / Messaging Systems', expand || false, mxUtils.bind(this, function(content)
  295. {
  296. for (var i = 0; i < fns.length; i++)
  297. {
  298. content.appendChild(fns[i](content));
  299. }
  300. }));
  301. };
  302. Sidebar.prototype.addEipSystemManagementPalette = function(expand)
  303. {
  304. var s2 = "html=1;strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.";
  305. var gn = 'mxgraph.eip';
  306. var dt = 'eip enterprise integration pattern system management ';
  307. this.addPaletteFunctions('eipSystem Management', 'EIP / System Management', false,
  308. [
  309. this.createVertexTemplateEntry(s2 + 'channel_purger;fillColor=#c0f5a9',
  310. 150, 90, '', 'Channel Purger', null, null, this.getTagsForStencil(gn, 'channel_purger', dt + '').join(' ')),
  311. this.createVertexTemplateEntry(s2 + 'control_bus;fillColor=#c0f5a9',
  312. 60, 40, '', 'Control Bus', null, null, this.getTagsForStencil(gn, 'control_bus', dt + '').join(' ')),
  313. this.createVertexTemplateEntry(s2 + 'detour;fillColor=#c0f5a9',
  314. 150, 90, '', 'Detour', null, null, this.getTagsForStencil(gn, 'detour', dt + '').join(' ')),
  315. this.createVertexTemplateEntry(s2 + 'message_store;fillColor=#c0f5a9',
  316. 150, 90, '', 'Message Store', null, null, this.getTagsForStencil(gn, 'message_store', dt + '').join(' ')),
  317. this.createVertexTemplateEntry(s2 + 'smart_proxy;fillColor=#c0f5a9',
  318. 70, 90, '', 'Smart Proxy', null, null, this.getTagsForStencil(gn, 'smart_proxy', dt + '').join(' ')),
  319. this.createVertexTemplateEntry(s2 + 'test_message;fillColor=#c0f5a9',
  320. 150, 90, '', 'Test Message', null, null, this.getTagsForStencil(gn, 'test_message', dt + '').join(' ')),
  321. this.createVertexTemplateEntry(s2 + 'wire_tap;fillColor=#c0f5a9',
  322. 150, 90, '', 'Wire Tap', null, null, this.getTagsForStencil(gn, 'wire_tap', dt + '').join(' '))
  323. ]);
  324. };
  325. })();