Class NamedEventConfigHandler
- java.lang.Object
-
- com.sun.faces.application.annotation.NamedEventConfigHandler
-
- All Implemented Interfaces:
ConfigAnnotationHandler
public class NamedEventConfigHandler extends Object implements ConfigAnnotationHandler
This class handles the processing the NamedEvent annotation. For each class with this annotation, the following logic is applied:- Get the unqualified class name (e.g., UserLoginEvent)
- Strip off the trailing "Event", if present (e.g., UserLogin)
- Convert the first character to lower-case (e.g., userLogin)
- Prepend the package name to the lower-cased name
- If the
shortName
attribute is specified, register the event by that name as well.
-
-
Constructor Summary
Constructors Constructor Description NamedEventConfigHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(Class<?> target, Annotation annotation)
Collect metadata based on the providedClass
andAnnotation
to be processed later byConfigAnnotationHandler.push(jakarta.faces.context.FacesContext)
.Collection<Class<? extends Annotation>>
getHandledAnnotations()
void
push(FacesContext ctx)
Push
the configuration based on the collected metadata to the current application.
-
-
-
Method Detail
-
getHandledAnnotations
public Collection<Class<? extends Annotation>> getHandledAnnotations()
- Specified by:
getHandledAnnotations
in interfaceConfigAnnotationHandler
- Returns:
- a
Collection
of annotations handled by this ConfigAnnotationHandler implementation
-
collect
public void collect(Class<?> target, Annotation annotation)
Description copied from interface:ConfigAnnotationHandler
Collect metadata based on the provided
Class
andAnnotation
to be processed later byConfigAnnotationHandler.push(jakarta.faces.context.FacesContext)
.NOTE: This method may be called more than once.
- Specified by:
collect
in interfaceConfigAnnotationHandler
- Parameters:
target
- annotated classannotation
-Annotation
to process
-
push
public void push(FacesContext ctx)
Description copied from interface:ConfigAnnotationHandler
Push
the configuration based on the collected metadata to the current application.- Specified by:
push
in interfaceConfigAnnotationHandler
- Parameters:
ctx
- the involved faces context
-
-