Package com.sun.faces.config
Class Verifier
- java.lang.Object
-
- com.sun.faces.config.Verifier
-
public class Verifier extends Object
This class backs thecom.sun.faces.verifyObjectsfeature which provides basic validation of Components, Converters, and Validators.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVerifier.ObjectTypeRepresent the current Faces object types we validate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VerifiergetCurrentInstance()List<String>getMessages()booleanisApplicationValid()static voidsetCurrentInstance(Verifier verifier)Set theVerifierfor this thread (typically the same thread that is used to bootstrap the application).voidvalidateObject(Verifier.ObjectType type, String className, Class<?> assignableTo)Validate the specified faces object by: Ensure the class can be found and loaded Ensure the object has a public, no-argument constructor Ensure the object is an instance of the class represented byassignableToIf any of these tests fail, queue a message to be displayed at a later point in time.
-
-
-
Method Detail
-
getCurrentInstance
public static Verifier getCurrentInstance()
- Returns:
- a
Verifierfor the current web application ifcom.sun.faces.verifyObjectsis enabled
-
setCurrentInstance
public static void setCurrentInstance(Verifier verifier)
Set theVerifierfor this thread (typically the same thread that is used to bootstrap the application).- Parameters:
verifier- theVerifierfor this web application
-
isApplicationValid
public boolean isApplicationValid()
- Returns:
trueif no messages were queued by the validation process
-
validateObject
public void validateObject(Verifier.ObjectType type, String className, Class<?> assignableTo)
Validate the specified faces object by:- Ensure the class can be found and loaded
- Ensure the object has a public, no-argument constructor
- Ensure the object is an instance of the class represented by
assignableTo
- Parameters:
type- The type of Faces object we're validatingclassName- the class name of the Faces object we're validatingassignableTo- the type we expectclassNameto either implement or extend
-
-