public abstract class JndiHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
JAVA_COMP_ENV
Stores the java:comp/env/ prefix
|
Constructor and Description |
---|
JndiHandler() |
Modifier and Type | Method and Description |
---|---|
void |
apply(FacesContext ctx,
Object... params)
Apply the
Annotation (s). |
protected void |
invokeMethod(FacesContext facesContext,
Method method,
Object instance,
Object value)
Invoke the method.
|
Object |
lookup(FacesContext facesContext,
String name)
Look up the given object using its JNDI name.
|
void |
setField(FacesContext facesContext,
Field field,
Object instance,
Object value)
Set the field.
|
protected static final String JAVA_COMP_ENV
public Object lookup(FacesContext facesContext, String name)
facesContext
- the Faces context.name
- the JNDI name.public void setField(FacesContext facesContext, Field field, Object instance, Object value)
facesContext
- the Faces context.field
- the field.instance
- the instance.value
- the value.protected void invokeMethod(FacesContext facesContext, Method method, Object instance, Object value)
facesContext
- the Faces context.method
- the method.instance
- the instance.value
- the value.public void apply(FacesContext ctx, Object... params)
Apply the Annotation
(s). The act
of doing so should affect the JSF runtime in some fashion (see the spec
for the specific annotation types).
NOTE: when adding new types of components that can be annotated,
the fact that we expose varargs here should be hidden. Type-safe methods
should be added to AnnotationManager
to clarify the contract.
ctx
- the FacesContext
for the current
requestparams
- one or more arguments to the handler instance. The type
and number may vary.Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.