class ResourceDependencyHandler extends java.lang.Object implements RuntimeAnnotationHandler
RuntimeAnnotationHandler
responsible for processing ResourceDependency
annotations.Modifier and Type | Class and Description |
---|---|
private static class |
ResourceDependencyHandler.Expressions
This helper class hides expression evaluation complexity.
|
Modifier and Type | Field and Description |
---|---|
private javax.faces.application.ResourceDependency[] |
dependencies |
private java.util.Map<javax.faces.application.ResourceDependency,ResourceDependencyHandler.Expressions> |
expressionsMap |
Constructor and Description |
---|
ResourceDependencyHandler(javax.faces.application.ResourceDependency[] dependencies) |
Modifier and Type | Method and Description |
---|---|
void |
apply(javax.faces.context.FacesContext ctx,
java.lang.Object... params)
Apply the
Annotation (s). |
private javax.faces.component.UIComponent |
createComponentResource(javax.faces.context.FacesContext ctx,
javax.faces.application.ResourceDependency dep)
Construct a new component resource based off the provided
ValueExpression s. |
private boolean |
hasBeenProcessed(javax.faces.context.FacesContext ctx,
javax.faces.application.ResourceDependency dep)
Determines of the specified
ResourceDependency has already been
previously processed. |
private void |
markProcssed(javax.faces.context.FacesContext ctx,
javax.faces.application.ResourceDependency dep)
Indicates that the specified ResourceDependency has been processed.
|
private void |
pushResourceToRoot(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent c)
Adds the specified
UIComponent as a component resource to the
UIViewRoot |
private javax.faces.application.ResourceDependency[] dependencies
private java.util.Map<javax.faces.application.ResourceDependency,ResourceDependencyHandler.Expressions> expressionsMap
public ResourceDependencyHandler(javax.faces.application.ResourceDependency[] dependencies)
public void apply(javax.faces.context.FacesContext ctx, java.lang.Object... params)
RuntimeAnnotationHandler
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.
apply
in interface RuntimeAnnotationHandler
ctx
- the FacesContext
for the current
requestparams
- one or more arguments to the handler instance. The type
and number may vary.private void pushResourceToRoot(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent c)
UIComponent
as a component resource to the
UIViewRoot
ctx
- the FacesContext
for the current requestc
- the component resourceprivate boolean hasBeenProcessed(javax.faces.context.FacesContext ctx, javax.faces.application.ResourceDependency dep)
ResourceDependency
has already been
previously processed.ctx
- the FacesContext
for the current requestdep
- the ResourceDependency
in questiontrue
if the ResourceDependency
has been
processed, otherwise false
private javax.faces.component.UIComponent createComponentResource(javax.faces.context.FacesContext ctx, javax.faces.application.ResourceDependency dep)
ValueExpression
s.ctx
- the FacesContext
for the current requestdep
- the ResourceDependency that the component resource will be
constructed fromprivate void markProcssed(javax.faces.context.FacesContext ctx, javax.faces.application.ResourceDependency dep)
ctx
- the FacesContext
for the current requestdep
- the ResourceDependency
Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.