public class ValidationContextFactory extends Object
Source of ValidationContext.
The ValidationContext returned by getContext()
is determined by the system property "ca.uhn.hl7v2.validation.context_class".
This factory defines two inner classes that can be used: DefaultValidation
and NoValidation. You can also create your own context, setting whatever rules
you want in its constructor, and reference it instead (it must have a zero-arg
constructor). If this property is not set, DefaultValidation is used.
Also note that the contexts provided here extend ValidationContextImpl,
so rule bindings can be added or removed programmatically from the starting set.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_PROPERTY |
| Constructor and Description |
|---|
ValidationContextFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ValidationContext |
customValidation(String contextClassName) |
static ValidationContext |
defaultValidation() |
static ValidationContext |
getContext()
Returns a singleton
ValidationContext, creating it if necessary. |
static ValidationContext |
noValidation() |
public static final String CONTEXT_PROPERTY
public ValidationContextFactory()
public static ValidationContext getContext() throws ValidationException
ValidationContext, creating it if necessary.ValidationContextValidationExceptionpublic static ValidationContext noValidation()
public static ValidationContext defaultValidation()
public static ValidationContext customValidation(String contextClassName) throws ValidationException
ValidationExceptionCopyright © 2001-2012 University Health Network. All Rights Reserved.