Package com.ibm.fhir.model.type
Class TriggerDefinition.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Element>
-
- com.ibm.fhir.model.type.Element.Builder
-
- com.ibm.fhir.model.type.TriggerDefinition.Builder
-
- Enclosing class:
- TriggerDefinition
public static class TriggerDefinition.Builder extends Element.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.Element.Builder
extension, id
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TriggerDefinitionbuild()Build theTriggerDefinitionTriggerDefinition.Buildercondition(Expression condition)A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.TriggerDefinition.Builderdata(DataRequirement... data)The triggering data of the event (if this is a data trigger).TriggerDefinition.Builderdata(Collection<DataRequirement> data)The triggering data of the event (if this is a data trigger).TriggerDefinition.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.TriggerDefinition.Builderextension(Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.protected TriggerDefinition.Builderfrom(TriggerDefinition triggerDefinition)TriggerDefinition.Builderid(String id)Unique id for the element within a resource (for internal references).TriggerDefinition.Buildername(String name)A formal name for the event.TriggerDefinition.Buildertiming(Element timing)The timing of the event (if this is a periodic trigger).TriggerDefinition.Buildertype(TriggerType type)The type of triggering event.-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from
-
-
-
-
Method Detail
-
id
public TriggerDefinition.Builder id(String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
idin classElement.Builder- Parameters:
id- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public TriggerDefinition.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list
- Overrides:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public TriggerDefinition.Builder extension(Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection
- Overrides:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
type
public TriggerDefinition.Builder type(TriggerType type)
The type of triggering event.This element is required.
- Parameters:
type- named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended- Returns:
- A reference to this Builder instance
-
name
public TriggerDefinition.Builder name(String name)
A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.- Parameters:
name- Name or URI that identifies the event- Returns:
- A reference to this Builder instance
-
timing
public TriggerDefinition.Builder timing(Element timing)
The timing of the event (if this is a periodic trigger).This is a choice element with the following allowed types:
When of typeReference, the allowed resource types for this reference are:Schedule
- Parameters:
timing- Timing of the event- Returns:
- A reference to this Builder instance
-
data
public TriggerDefinition.Builder data(DataRequirement... data)
The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.Adds new element(s) to the existing list
- Parameters:
data- Triggering data of the event (multiple = 'and')- Returns:
- A reference to this Builder instance
-
data
public TriggerDefinition.Builder data(Collection<DataRequirement> data)
The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
data- Triggering data of the event (multiple = 'and')- Returns:
- A reference to this Builder instance
-
condition
public TriggerDefinition.Builder condition(Expression condition)
A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.- Parameters:
condition- Whether the event triggers (boolean expression)- Returns:
- A reference to this Builder instance
-
build
public TriggerDefinition build()
- Specified by:
buildin interfaceBuilder<Element>- Specified by:
buildin classElement.Builder- Returns:
- An immutable object of type
TriggerDefinition - Throws:
IllegalStateException- if the current state cannot be built into a valid TriggerDefinition per the base specification
-
from
protected TriggerDefinition.Builder from(TriggerDefinition triggerDefinition)
-
-