public class RuleTypeBuilder<S extends RuleTypeBuilder<S,T>,T extends Rule<?>> extends BuilderSupport
refersToSection(java.lang.String)
, active
, test(T)
) to return their specific builder type.Modifier and Type | Class and Description |
---|---|
class |
RuleTypeBuilder.MessageExpressionBuilder
Helper builder when the events are not given explicitly but in form of an expression.
|
Modifier | Constructor and Description |
---|---|
protected |
RuleTypeBuilder() |
protected |
RuleTypeBuilder(List<RuleBinding<? extends Rule<?>>> rules,
Set<Version> versions) |
protected |
RuleTypeBuilder(List<RuleBinding<? extends Rule<?>>> rules,
Version... versions) |
Modifier and Type | Method and Description |
---|---|
protected Collection<RuleBinding<T>> |
activate(Collection<RuleBinding<T>> bindings) |
S |
active(boolean active)
Marks the rule as being active (default) or inactive
|
protected void |
addRuleBindings(T rule)
Add
RuleBinding s for the rule that have been built |
S |
description(String description)
Adds a description to the rule
|
EncodingRuleBuilder |
encoding(String encoding)
Builds
MessageRule s for the specified encoding |
protected Collection<RuleBinding<T>> |
getRuleBindings(T rule,
String version)
Builder implementation must overwrite this method to return all
RuleBinding s for
rules that have been built. |
protected List<RuleBinding<? extends Rule<?>>> |
getRules() |
protected S |
instance() |
RuleTypeBuilder.MessageExpressionBuilder |
message()
Builds
MessageRule s for event types and triggers to be specified
using the returned MessageExpressionBuilder. |
MessageRuleBuilder |
message(String eventType,
String... triggerEvents)
Builds
MessageRule s for the specified event types and triggers |
protected T |
prepareRule(T rule) |
PrimitiveRuleBuilder |
primitive(String... type)
Builds
PrimitiveTypeRule s for the specified types |
S |
refersToSection(String sectionReference)
Adds a HL7 section reference to a rule
|
S |
severity(Severity severity)
Sets the severity of the rule
|
S |
test(T rule)
Adds the specified rule to the set of rules.
|
allOf, allOf, always, alwaysFails, anyOf, anyOf, date, dateTime, dateTime25, empty, emptyOr, in, in, isEqual, isEqualIgnoreCase, matches, matches, matches, maxLength, nonNegativeInteger, not, number, oid, startsWith, time, usPhoneNumber, uuid, withdrawn
protected RuleTypeBuilder()
protected RuleTypeBuilder(List<RuleBinding<? extends Rule<?>>> rules, Set<Version> versions)
protected RuleTypeBuilder(List<RuleBinding<? extends Rule<?>>> rules, Version... versions)
protected List<RuleBinding<? extends Rule<?>>> getRules()
protected T prepareRule(T rule)
public S description(String description)
description
- descriptionpublic S refersToSection(String sectionReference)
sectionReference
- the section in the HL7 specificationpublic S severity(Severity severity)
severity
- the the severity of the rulepublic S active(boolean active)
active
- true if this rule shall be activepublic S test(T rule)
rule
- the rule to be testedpublic PrimitiveRuleBuilder primitive(String... type)
PrimitiveTypeRule
s for the specified typestype
- an array of typespublic MessageRuleBuilder message(String eventType, String... triggerEvents)
MessageRule
s for the specified event types and triggerseventType
- Event type, e.g. "ADT", or "*" for all typestriggerEvents,
- e.g. "A01" or "A01,A04", or "*" for all trigger eventspublic RuleTypeBuilder.MessageExpressionBuilder message()
MessageRule
s for event types and triggers to be specified
using the returned MessageExpressionBuilder.public EncodingRuleBuilder encoding(String encoding)
MessageRule
s for the specified encodingencoding
- "XML" or "VB"protected void addRuleBindings(T rule)
RuleBinding
s for the rule that have been builtrule
- the rule for which bindings shall be addedprotected Collection<RuleBinding<T>> getRuleBindings(T rule, String version)
RuleBinding
s for
rules that have been built.rule
- the rule for which bindings shall be retrievedversion
- the HL7 version for which bindings shall be retrievedRuleBinding
sprotected Collection<RuleBinding<T>> activate(Collection<RuleBinding<T>> bindings)
Copyright © 2001–2017 University Health Network. All rights reserved.