Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.extension.validation
Class InstanceValidationContext

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.extension.validation.InstanceValidationContext

public class InstanceValidationContext
extends Object

Context for instance validation.

Author:
Kai Schwierczek

Constructor Summary
InstanceValidationContext()
          Constructs a new context object.
 
Method Summary
 boolean containsContext(Class<? extends ConstraintValidator> validatorClass)
          Returns true, if and only if there is a context object present for the given validator class.
 Object getContext(Class<? extends ConstraintValidator> validatorClass)
          Returns the object associated with the given validator class.
 void putContext(Class<? extends ConstraintValidator> validatorClass, Object contextObject)
          Sets the given object as the context object for the given validator class.
The object may not be null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceValidationContext

public InstanceValidationContext()
Constructs a new context object.

Method Detail

getContext

public Object getContext(Class<? extends ConstraintValidator> validatorClass)
Returns the object associated with the given validator class.

Parameters:
validatorClass - the validator class
Returns:
the associated object or null if none was set

containsContext

public boolean containsContext(Class<? extends ConstraintValidator> validatorClass)
Returns true, if and only if there is a context object present for the given validator class.

Parameters:
validatorClass - the validator class
Returns:
true, if and only if there is a context object present for the given validator class

putContext

public void putContext(Class<? extends ConstraintValidator> validatorClass,
                       Object contextObject)
Sets the given object as the context object for the given validator class.
The object may not be null.

Parameters:
validatorClass - the validator class
contextObject - the new associated object, may not be null

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d