Class: DomainEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_commons_ruby/DomainEvent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#eventNameObject (readonly)

Returns the value of attribute eventName.



20
21
22
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 20

def eventName
  @eventName
end

#locationObject (readonly)

Returns the value of attribute location.



22
23
24
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 22

def location
  @location
end

#projectIdObject (readonly)

Returns the value of attribute projectId.



16
17
18
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 16

def projectId
  @projectId
end

#requestBodyObject (readonly)

Returns the value of attribute requestBody.



21
22
23
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 21

def requestBody
  @requestBody
end

#tenantIdObject (readonly)

Returns the value of attribute tenantId.



15
16
17
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 15

def tenantId
  @tenantId
end

#topicObject (readonly)

Returns the value of attribute topic.



19
20
21
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 19

def topic
  @topic
end

#viewGroupComponentObject (readonly)

Returns the value of attribute viewGroupComponent.



18
19
20
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 18

def viewGroupComponent
  @viewGroupComponent
end

#viewGroupDefinitionObject (readonly)

Returns the value of attribute viewGroupDefinition.



17
18
19
# File 'lib/apollo_commons_ruby/DomainEvent.rb', line 17

def viewGroupDefinition
  @viewGroupDefinition
end