Class RegularExpressionService
java.lang.Object
fr.paris.lutece.portal.service.regularexpression.RegularExpressionService
this class provides services for use regular expression
-
Constructor Summary
ConstructorsConstructorDescriptionRegularExpressionService(jakarta.enterprise.inject.Instance<IRegularExpressionService> service) -
Method Summary
Modifier and TypeMethodDescriptionreturn a list of regular expressionstatic RegularExpressionServiceDeprecated, for removal: This API element is subject to removal in a future version.getRegularExpressionByKey(int nKey) return the regular expression object whose identifier is specified in parameterbooleanbooleanisMatches(String strValueToTest, RegularExpression regularExpression) return true if the value in parameter verify the regular expressionbooleanreturn true if the value in parameter verify the pattern
-
Constructor Details
-
RegularExpressionService
public RegularExpressionService() -
RegularExpressionService
@Inject public RegularExpressionService(jakarta.enterprise.inject.Instance<IRegularExpressionService> service)
-
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theRegularExpressionServiceinstance. This method will be removed in future versions.Returns the unique instance of theRegularExpressionServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theRegularExpressionServiceinstance instead.- Returns:
- The unique instance of
RegularExpressionService.
-
isAvailable
public boolean isAvailable()- Returns:
- true if the regular expression service is available
-
isMatches
return true if the value in parameter verify the pattern- Parameters:
strValueToTest- the value to teststrPattern- the regular expression Pattern- Returns:
- true if the value in parameter verify the pattern
-
isMatches
return true if the value in parameter verify the regular expression- Parameters:
strValueToTest- the value to testregularExpression- the regular expression- Returns:
- true if the value verify the regular expression
-
getRegularExpressionByKey
return the regular expression object whose identifier is specified in parameter- Parameters:
nKey- the regular expression key- Returns:
- the regular expression object whose identifier is specified in parameter
-
getAllRegularExpression
return a list of regular expression- Returns:
- all regular expression
-
@Injectto obtain theRegularExpressionServiceinstance.