Skip to content

Commit

Permalink
Internal Request param removed in Emit event
Browse files Browse the repository at this point in the history
  • Loading branch information
MalarsriA committed Oct 21, 2024
1 parent e60f52b commit 2bb1da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/liveTemplates/backbase.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<templateSet group="backbase">
<template name="emitevent" value="private final com.backbase.buildingblocks.backend.communication.event.proxy.EventBus eventBus;&#10;private final com.backbase.buildingblocks.backend.internalrequest.UserRequestContext context;&#10;&#10; public $CLASS_NAME$(com.backbase.buildingblocks.backend.communication.event.proxy.EventBus eventBus, com.backbase.buildingblocks.backend.internalrequest.UserRequestContext context) {&#10; this.eventBus = eventBus;&#10; this.context= context;&#10; }&#10;public void exampleEmitEvent(com.backbase.buildingblocks.backend.internalrequest.InternalRequest&lt;?&gt; request) {&#10;&#10; var event = new $EVENT_CLASS$();&#10; event.setData(&quot;some data&quot;); //TODO fill event based on the request. &#10;&#10;var envelopedEvent = new com.backbase.buildingblocks.backend.communication.event.EnvelopedEvent&lt;$EVENT_CLASS$&gt;();&#10; envelopedEvent.setEvent(event);&#10; envelopedEvent.setUserRequestContext(context);&#10; eventBus.emitEvent(envelopedEvent);&#10;}" description="Method to emit an event" toReformat="true" toShortenFQNames="true">
<template name="emitevent" value="private final com.backbase.buildingblocks.backend.communication.event.proxy.EventBus eventBus;&#10;private final com.backbase.buildingblocks.backend.internalrequest.UserRequestContext context;&#10;&#10; public $CLASS_NAME$(com.backbase.buildingblocks.backend.communication.event.proxy.EventBus eventBus, com.backbase.buildingblocks.backend.internalrequest.UserRequestContext context) {&#10; this.eventBus = eventBus;&#10; this.context= context;&#10; }&#10;public void exampleEmitEvent() {&#10;&#10; var event = new $EVENT_CLASS$();&#10; event.setData(&quot;some data&quot;); //TODO fill event based on the request. &#10;&#10;var envelopedEvent = new com.backbase.buildingblocks.backend.communication.event.EnvelopedEvent&lt;$EVENT_CLASS$&gt;();&#10; envelopedEvent.setEvent(event);&#10; envelopedEvent.setUserRequestContext(context);&#10; eventBus.emitEvent(envelopedEvent);&#10;}" description="Method to emit an event" toReformat="true" toShortenFQNames="true">
<variable name="CLASS_NAME" expression="className()" defaultValue="" alwaysStopAt="false" />
<variable name="EVENT_CLASS" expression="subtypes(&quot;com.backbase.buildingblocks.persistence.model.Event&quot;)" defaultValue="" alwaysStopAt="true" />
<context>
Expand Down

0 comments on commit 2bb1da7

Please sign in to comment.