public class Verifier extends Object
This class backs the com.sun.faces.verifyObjects
feature which provides basic validation of Components,
Converters, and Validators.
Modifier and Type | Class and Description |
---|---|
static class |
Verifier.ObjectType
Represent the current Faces object types we validate.
|
Modifier and Type | Method and Description |
---|---|
static Verifier |
getCurrentInstance() |
List<String> |
getMessages() |
boolean |
isApplicationValid() |
static void |
setCurrentInstance(Verifier verifier)
Set the
Verifier for this thread (typically the
same thread that is used to bootstrap the application). |
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
If any of these tests fail, queue a message to be displayed at a
later point in time. |
public static Verifier getCurrentInstance()
Verifier
for the current web application
if com.sun.faces.verifyObjects
is enabledpublic static void setCurrentInstance(Verifier verifier)
Verifier
for this thread (typically the
same thread that is used to bootstrap the application).verifier
- the Verifier
for this web applicationpublic boolean isApplicationValid()
true
if no messages were queued by the
validation processpublic void validateObject(Verifier.ObjectType type, String className, Class<?> assignableTo)
assignableTo
type
- The type of Faces object we're validatingclassName
- the class name of the Faces object we're validatingassignableTo
- the type we expect className
to
either implement or extendCopyright © 2010–2019 JBoss by Red Hat. All rights reserved.