Class BeforeControllerEventImpl
java.lang.Object
fr.paris.lutece.portal.web.cdi.mvc.event.BeforeControllerEventImpl
- All Implemented Interfaces:
BeforeControllerEvent,MvcEvent
Default implementation of the
BeforeControllerEvent interface.
This class represents the event fired just before the MVC controller is executed. It can be extended to carry additional contextual data (e.g., request parameters, user session info) if needed by observers.
Typically fired by the EventDispatcher
at the beginning of the request lifecycle.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.paris.lutece.portal.web.cdi.mvc.event.MvcEvent
MvcEvent.ControllerInvocationType -
Constructor Summary
ConstructorsConstructorDescriptionBeforeControllerEventImpl(Method invokedMethod, boolean isBackOffice, MvcEvent.ControllerInvocationType invocationType, boolean isSecurityTokenEnabled) Constructs a newBeforeControllerEventImplwith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionIndicates the type of controller invocation (e.g., view, action, messageBox).Returns the controller method that is about to be invoked.booleanIndicates whether the current request is in the back-office (BO) context.booleanReturns the status of the automatic security token generation and validation.
-
Constructor Details
-
BeforeControllerEventImpl
public BeforeControllerEventImpl(Method invokedMethod, boolean isBackOffice, MvcEvent.ControllerInvocationType invocationType, boolean isSecurityTokenEnabled) Constructs a newBeforeControllerEventImplwith the given parameters.- Parameters:
invokedMethod- the method that will be invokedisBackOffice-trueif the context is back-office (BO),falseif front-office (FO)invocationType- the type of controller call (e.g., VIEW, ACTION, etc.)
-
-
Method Details
-
getInvokedMethod
Description copied from interface:BeforeControllerEventReturns the controller method that is about to be invoked.- Specified by:
getInvokedMethodin interfaceBeforeControllerEvent- Returns:
- a
Methodobject representing the target controller method
-
isBackOffice
public boolean isBackOffice()Description copied from interface:BeforeControllerEventIndicates whether the current request is in the back-office (BO) context.- Specified by:
isBackOfficein interfaceBeforeControllerEvent- Returns:
trueif the request is part of the back-office,falseotherwise
-
getInvocationType
Description copied from interface:BeforeControllerEventIndicates the type of controller invocation (e.g., view, action, messageBox).- Specified by:
getInvocationTypein interfaceBeforeControllerEvent- Returns:
- a
MvcEvent.ControllerInvocationTypeenum describing the nature of the method being invoked
-
isSecurityTokenEnabled
public boolean isSecurityTokenEnabled()Description copied from interface:BeforeControllerEventReturns the status of the automatic security token generation and validation.- Specified by:
isSecurityTokenEnabledin interfaceBeforeControllerEvent- Returns:
trueif the controller uses the automatic security token process,falseotherwise
-