io.serverlessworkflow.api.switchconditions.EventCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serverlessworkflow-api Show documentation
Show all versions of serverlessworkflow-api Show documentation
Java SDK for Serverless Workflow Specification
package io.serverlessworkflow.api.switchconditions;
import java.io.Serializable;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.serverlessworkflow.api.end.End;
import io.serverlessworkflow.api.filters.EventDataFilter;
import io.serverlessworkflow.api.interfaces.SwitchCondition;
import io.serverlessworkflow.api.transitions.Transition;
/**
* Switch state data event condition
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"eventRef",
"eventDataFilter",
"transition",
"end"
})
public class EventCondition implements Serializable, SwitchCondition
{
/**
* Event condition name
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Event condition name")
private String name;
/**
* References an unique event name in the defined workflow events
* (Required)
*
*/
@JsonProperty("eventRef")
@JsonPropertyDescription("References an unique event name in the defined workflow events")
@NotNull
private String eventRef;
@JsonProperty("eventDataFilter")
@Valid
private EventDataFilter eventDataFilter;
/**
*
* (Required)
*
*/
@JsonProperty("transition")
@Valid
@NotNull
private Transition transition;
/**
* State end definition
*
*/
@JsonProperty("end")
@JsonPropertyDescription("State end definition")
@Valid
private End end;
private final static long serialVersionUID = -7038422702983954581L;
/**
* No args constructor for use in serialization
*
*/
public EventCondition() {
}
/**
*
* @param eventRef
* @param transition
*/
public EventCondition(String eventRef, Transition transition) {
super();
this.eventRef = eventRef;
this.transition = transition;
}
/**
* Event condition name
*
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* Event condition name
*
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
public EventCondition withName(String name) {
this.name = name;
return this;
}
/**
* References an unique event name in the defined workflow events
* (Required)
*
*/
@JsonProperty("eventRef")
public String getEventRef() {
return eventRef;
}
/**
* References an unique event name in the defined workflow events
* (Required)
*
*/
@JsonProperty("eventRef")
public void setEventRef(String eventRef) {
this.eventRef = eventRef;
}
public EventCondition withEventRef(String eventRef) {
this.eventRef = eventRef;
return this;
}
@JsonProperty("eventDataFilter")
public EventDataFilter getEventDataFilter() {
return eventDataFilter;
}
@JsonProperty("eventDataFilter")
public void setEventDataFilter(EventDataFilter eventDataFilter) {
this.eventDataFilter = eventDataFilter;
}
public EventCondition withEventDataFilter(EventDataFilter eventDataFilter) {
this.eventDataFilter = eventDataFilter;
return this;
}
/**
*
* (Required)
*
*/
@JsonProperty("transition")
public Transition getTransition() {
return transition;
}
/**
*
* (Required)
*
*/
@JsonProperty("transition")
public void setTransition(Transition transition) {
this.transition = transition;
}
public EventCondition withTransition(Transition transition) {
this.transition = transition;
return this;
}
/**
* State end definition
*
*/
@JsonProperty("end")
public End getEnd() {
return end;
}
/**
* State end definition
*
*/
@JsonProperty("end")
public void setEnd(End end) {
this.end = end;
}
public EventCondition withEnd(End end) {
this.end = end;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy