java.lang.Object
com.sun.faces.application.annotation.NamedEventConfigHandler
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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>> void
push
(FacesContext ctx) Push
the configuration based on the collected metadata to the current application.
-
Constructor Details
-
NamedEventConfigHandler
public NamedEventConfigHandler()
-
-
Method Details
-
getHandledAnnotations
- Specified by:
getHandledAnnotations
in interfaceConfigAnnotationHandler
- Returns:
- a
Collection
of annotations handled by this ConfigAnnotationHandler implementation
-
collect
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
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
-