Class FormsRegularExpressionRemovalListener
java.lang.Object
fr.paris.lutece.plugins.forms.service.listener.FormsRegularExpressionRemovalListener
- All Implemented Interfaces:
fr.paris.lutece.portal.service.util.RemovalListener
@ApplicationScoped
public class FormsRegularExpressionRemovalListener
extends Object
implements fr.paris.lutece.portal.service.util.RemovalListener
Refuses the removal of a regular expression while a control of a form (pattern validator) uses it: once removed, the control would reject every
non-empty answer and the form could no longer be submitted.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeRemoved(String strId) getRemovalRefusedMessage(String strId, Locale locale) voidRegisters this listener with the removal service of the regular expressions when the application starts.
-
Constructor Details
-
FormsRegularExpressionRemovalListener
public FormsRegularExpressionRemovalListener()
-
-
Method Details
-
register
public void register(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) Object context) Registers this listener with the removal service of the regular expressions when the application starts.- Parameters:
context- the context of the started application
-
canBeRemoved
- Specified by:
canBeRemovedin interfacefr.paris.lutece.portal.service.util.RemovalListener
-
getRemovalRefusedMessage
- Specified by:
getRemovalRefusedMessagein interfacefr.paris.lutece.portal.service.util.RemovalListener
-