Package io.serverlessworkflow.api.events
Class EventDefinition
- java.lang.Object
-
- io.serverlessworkflow.api.events.EventDefinition
-
- All Implemented Interfaces:
Serializable
public class EventDefinition extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventDefinition.Kind
-
Constructor Summary
Constructors Constructor Description EventDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CorrelationDef>
getCorrelation()
CloudEvent correlation definitionsEventDefinition.Kind
getKind()
Defines the events as either being consumed or produced by the workflow.Map<String,String>
getMetadata()
MetadataString
getName()
Event Definition unique nameString
getSource()
CloudEvent source UUIDString
getType()
CloudEvent typeboolean
isDataOnly()
If `true`, only the Event payload is accessible to consuming Workflow states.void
setCorrelation(List<CorrelationDef> correlation)
CloudEvent correlation definitionsvoid
setDataOnly(boolean dataOnly)
If `true`, only the Event payload is accessible to consuming Workflow states.void
setKind(EventDefinition.Kind kind)
Defines the events as either being consumed or produced by the workflow.void
setMetadata(Map<String,String> metadata)
Metadatavoid
setName(String name)
Event Definition unique namevoid
setSource(String source)
CloudEvent source UUIDvoid
setType(String type)
CloudEvent typeEventDefinition
withCorrelation(List<CorrelationDef> correlation)
EventDefinition
withDataOnly(boolean dataOnly)
EventDefinition
withKind(EventDefinition.Kind kind)
EventDefinition
withMetadata(Map<String,String> metadata)
EventDefinition
withName(String name)
EventDefinition
withSource(String source)
EventDefinition
withType(String type)
-
-
-
Method Detail
-
getName
public String getName()
Event Definition unique name
-
setName
public void setName(String name)
Event Definition unique name
-
withName
public EventDefinition withName(String name)
-
getSource
public String getSource()
CloudEvent source UUID
-
setSource
public void setSource(String source)
CloudEvent source UUID
-
withSource
public EventDefinition withSource(String source)
-
getType
public String getType()
CloudEvent type
-
setType
public void setType(String type)
CloudEvent type
-
withType
public EventDefinition withType(String type)
-
getCorrelation
public List<CorrelationDef> getCorrelation()
CloudEvent correlation definitions
-
setCorrelation
public void setCorrelation(List<CorrelationDef> correlation)
CloudEvent correlation definitions
-
withCorrelation
public EventDefinition withCorrelation(List<CorrelationDef> correlation)
-
isDataOnly
public boolean isDataOnly()
If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible
-
setDataOnly
public void setDataOnly(boolean dataOnly)
If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible
-
withDataOnly
public EventDefinition withDataOnly(boolean dataOnly)
-
getKind
public EventDefinition.Kind getKind()
Defines the events as either being consumed or produced by the workflow. Default is consumed
-
setKind
public void setKind(EventDefinition.Kind kind)
Defines the events as either being consumed or produced by the workflow. Default is consumed
-
withKind
public EventDefinition withKind(EventDefinition.Kind kind)
-
withMetadata
public EventDefinition withMetadata(Map<String,String> metadata)
-
-