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
shortNameattribute 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 voidcollect(Class<?> target, Annotation annotation)Collect metadata based on the providedClassandAnnotationto be processed later byConfigAnnotationHandler.push(jakarta.faces.context.FacesContext).Collection<Class<? extends Annotation>>getHandledAnnotations()voidpush(FacesContext ctx)Pushthe configuration based on the collected metadata to the current application.
-
-
-
Method Detail
-
getHandledAnnotations
public Collection<Class<? extends Annotation>> getHandledAnnotations()
- Specified by:
getHandledAnnotationsin interfaceConfigAnnotationHandler- Returns:
- a
Collectionof annotations handled by this ConfigAnnotationHandler implementation
-
collect
public void collect(Class<?> target, Annotation annotation)
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
public void push(FacesContext ctx)
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
-
-