Class: DomainEvent
- Inherits:
-
Object
- Object
- DomainEvent
- Defined in:
- lib/apollo_commons_ruby/DomainEvent.rb
Instance Attribute Summary collapse
-
#eventName ⇒ Object
readonly
Returns the value of attribute eventName.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#projectId ⇒ Object
readonly
Returns the value of attribute projectId.
-
#requestBody ⇒ Object
readonly
Returns the value of attribute requestBody.
-
#tenantId ⇒ Object
readonly
Returns the value of attribute tenantId.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#viewGroupComponent ⇒ Object
readonly
Returns the value of attribute viewGroupComponent.
-
#viewGroupDefinition ⇒ Object
readonly
Returns the value of attribute viewGroupDefinition.
Instance Method Summary collapse
-
#initialize(configuration_json, view_group_definition, view_group_component, topic, event_name) ⇒ DomainEvent
constructor
A new instance of DomainEvent.
Constructor Details
#initialize(configuration_json, view_group_definition, view_group_component, topic, event_name) ⇒ DomainEvent
Returns a new instance of DomainEvent.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 24 def initialize(configuration_json, view_group_definition, view_group_component, topic, event_name) @tenantId = configuration_json["tenantId"] @projectId = configuration_json["projectId"] @viewGroupDefinition = view_group_definition @viewGroupComponent = view_group_component @topic = topic @eventName = event_name @location = "./configs/" + view_group_definition + "/" + view_group_component + "/" + topic + "/" + event_name domain_event_properties = File.read(location + "/domain_event_properties.json") @requestBody = JSON.parse domain_event_properties end |
Instance Attribute Details
#eventName ⇒ Object (readonly)
Returns the value of attribute eventName.
20 21 22 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 20 def eventName @eventName end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
22 23 24 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 22 def location @location end |
#projectId ⇒ Object (readonly)
Returns the value of attribute projectId.
16 17 18 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 16 def projectId @projectId end |
#requestBody ⇒ Object (readonly)
Returns the value of attribute requestBody.
21 22 23 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 21 def requestBody @requestBody end |
#tenantId ⇒ Object (readonly)
Returns the value of attribute tenantId.
15 16 17 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 15 def tenantId @tenantId end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
19 20 21 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 19 def topic @topic end |
#viewGroupComponent ⇒ Object (readonly)
Returns the value of attribute viewGroupComponent.
18 19 20 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 18 def viewGroupComponent @viewGroupComponent end |
#viewGroupDefinition ⇒ Object (readonly)
Returns the value of attribute viewGroupDefinition.
17 18 19 |
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 17 def viewGroupDefinition @viewGroupDefinition end |