fr.cnes.sitools.common.validator
Class Validator<T extends Validable>

java.lang.Object
  extended by fr.cnes.sitools.common.validator.Validator<T>
Type Parameters:
T - the type of object to validate

public abstract class Validator<T extends Validable>
extends java.lang.Object

Validate a object

Author:
m.gond

Constructor Summary
Validator()
           
 
Method Summary
 org.restlet.Context getContext()
          Gets the context value
 void setContext(org.restlet.Context context)
          Sets the value of context
abstract  java.util.Set<ConstraintViolation> validate(T item)
          Validate a given Object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator()
Method Detail

validate

public abstract java.util.Set<ConstraintViolation> validate(T item)
Validate a given Object

Parameters:
item - the object to validate
Returns:
a Set of ContraintViolation representing the list of violation on the object

setContext

public void setContext(org.restlet.Context context)
Sets the value of context

Parameters:
context - the context to set

getContext

public org.restlet.Context getContext()
Gets the context value

Returns:
the context


Copyright © 2010-2013 CNES. All Rights Reserved.