Record Class EventDefinition
java.lang.Object
java.lang.Record
com.iantapply.orchestra.api.EventDefinition
- Record Components:
id- stable lowercase event identifierdisplayName- human-readable event nameschedule- recurring schedule, ornullfor manually started eventstargets- servers eligible to execute the eventstages- ordered workflow stages
public record EventDefinition(String id, String displayName, RecurringSchedule schedule, TargetSelector targets, List<StageDefinition> stages)
extends Record
Immutable definition of a complete event workflow.
-
Constructor Summary
ConstructorsConstructorDescriptionEventDefinition(String id, String displayName, RecurringSchedule schedule, TargetSelector targets, List<StageDefinition> stages) Validates the definition and snapshots its ordered stages.EventDefinition(String id, String displayName, TargetSelector targets, List<StageDefinition> stages) Creates a definition without a recurring schedule. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.schedule()Returns the value of theschedulerecord component.stages()Returns the value of thestagesrecord component.targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventDefinition
public EventDefinition(String id, String displayName, RecurringSchedule schedule, TargetSelector targets, List<StageDefinition> stages) Validates the definition and snapshots its ordered stages. -
EventDefinition
public EventDefinition(String id, String displayName, TargetSelector targets, List<StageDefinition> stages) Creates a definition without a recurring schedule.- Parameters:
id- stable event identifierdisplayName- human-readable event nametargets- servers eligible to execute the eventstages- ordered workflow stages
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
schedule
-
targets
-
stages
-