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
shortNameattribute is specified, register the event by that name as well.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(Class<?> target, Annotation annotation) Collect metadata based on the providedClassandAnnotationto be processed later byConfigAnnotationHandler.push(jakarta.faces.context.FacesContext).Collection<Class<? extends Annotation>> voidpush(FacesContext ctx) Pushthe configuration based on the collected metadata to the current application.
-
Constructor Details
-
NamedEventConfigHandler
public NamedEventConfigHandler()
-
-
Method Details
-
getHandledAnnotations
- Specified by:
getHandledAnnotationsin interfaceConfigAnnotationHandler- Returns:
- a
Collectionof annotations handled by this ConfigAnnotationHandler implementation
-
collect
Description copied from interface:ConfigAnnotationHandlerCollect metadata based on the provided
ClassandAnnotationto be processed later byConfigAnnotationHandler.push(jakarta.faces.context.FacesContext).NOTE: This method may be called more than once.
- Specified by:
collectin interfaceConfigAnnotationHandler- Parameters:
target- annotated classannotation-Annotationto process
-
push
Description copied from interface:ConfigAnnotationHandlerPushthe configuration based on the collected metadata to the current application.- Specified by:
pushin interfaceConfigAnnotationHandler- Parameters:
ctx- the involved faces context
-