public abstract class RuleSupport<T> extends Object implements Rule<T>
Constructor and Description |
---|
RuleSupport() |
Modifier and Type | Method and Description |
---|---|
protected ValidationException[] |
failed(Exception e) |
protected ValidationException[] |
failed(Exception e,
Location location) |
protected ValidationException[] |
failed(String msg) |
protected ValidationException[] |
failed(String msg,
Location location) |
protected ValidationException[] |
failedWithValue(Object value,
Location location) |
String |
getDescription()
Returns a text description of the rule.
|
ErrorCode |
getErrorCode() |
String |
getSectionReference()
Returns a string indicating the section of the HL7 standard from which this rule
is derived (if applicable).
|
Severity |
getSeverity() |
protected ValidationException[] |
passed() |
protected ValidationException[] |
result(boolean result,
Object value) |
protected ValidationException[] |
result(boolean result,
Object value,
Location location) |
void |
setDescription(String description) |
void |
setErrorCode(ErrorCode errorCode) |
void |
setSectionReference(String sectionReference) |
void |
setSeverity(Severity severity) |
public RuleSupport()
protected ValidationException[] result(boolean result, Object value)
protected ValidationException[] result(boolean result, Object value, Location location)
protected ValidationException[] passed()
protected ValidationException[] failedWithValue(Object value, Location location)
protected ValidationException[] failed(String msg)
protected ValidationException[] failed(String msg, Location location)
protected ValidationException[] failed(Exception e)
protected ValidationException[] failed(Exception e, Location location)
public String getSectionReference()
Rule
getSectionReference
in interface Rule<T>
Rule.getSectionReference()
public String getDescription()
Rule
getDescription
in interface Rule<T>
Rule.getDescription()
public Severity getSeverity()
public ErrorCode getErrorCode()
public void setSeverity(Severity severity)
public void setDescription(String description)
public void setSectionReference(String sectionReference)
public void setErrorCode(ErrorCode errorCode)
Copyright © 2001–2017 University Health Network. All rights reserved.