Class RegularExpressionService
- java.lang.Object
-
- fr.paris.lutece.plugins.regularexpression.service.RegularExpressionService
-
- All Implemented Interfaces:
fr.paris.lutece.portal.service.regularexpression.IRegularExpressionService
public class RegularExpressionService extends java.lang.Object implements fr.paris.lutece.portal.service.regularexpression.IRegularExpressionServiceRegular expression service
-
-
Constructor Summary
Constructors Constructor Description RegularExpressionService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidformatRichTextAttributes(fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression)Format in HTML richText attributes of a regularExpressionjava.util.List<fr.paris.lutece.portal.business.regularexpression.RegularExpression>getAllRegularExpression()return a list of regular expressionjava.util.List<fr.paris.lutece.portal.business.regularexpression.RegularExpression>getAllRegularExpression(boolean bForEditor)return a list of regular expressionfr.paris.lutece.portal.business.regularexpression.RegularExpressiongetRegularExpressionByKey(int nKey)return the regular expression object whose identifier is specified in parameterfr.paris.lutece.portal.business.regularexpression.RegularExpressiongetRegularExpressionByKey(int nKey, boolean bForEditor)return the regular expression object whose identifier is specified in parameterbooleanisMatches(java.lang.String strValueToTest, fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression)return true if the value in parameter verify the regular expressionbooleanisMatches(java.lang.String strValueToTest, java.lang.String strPattern)return true if the value in parameter verify the patternbooleanisPatternValide(fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression)return false if the expression's syntax is invalidbooleanisPatternValide(java.lang.String strPattern)return false if the pattern is invalid
-
-
-
Method Detail
-
isPatternValide
public boolean isPatternValide(java.lang.String strPattern)
return false if the pattern is invalid- Specified by:
isPatternValidein interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Parameters:
strPattern- the pattern to test- Returns:
- false if the pattern is invalid
-
isPatternValide
public boolean isPatternValide(fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression)
return false if the expression's syntax is invalid- Specified by:
isPatternValidein interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Parameters:
regularExpression- the regular expression object to test- Returns:
- false if the expression's syntax is invalid
-
isMatches
public boolean isMatches(java.lang.String strValueToTest, java.lang.String strPattern)return true if the value in parameter verify the pattern- Specified by:
isMatchesin interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Parameters:
strValueToTest- the value to teststrPattern- the regular expression Pattern- Returns:
- true if the value in parameter verify the pattern
-
isMatches
public boolean isMatches(java.lang.String strValueToTest, fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression)return true if the value in parameter verify the regular expression- Specified by:
isMatchesin interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Parameters:
strValueToTest- the value to testregularExpression- the regular expression- Returns:
- true if the value verify the regular expression
-
getRegularExpressionByKey
public fr.paris.lutece.portal.business.regularexpression.RegularExpression getRegularExpressionByKey(int nKey)
return the regular expression object whose identifier is specified in parameter- Specified by:
getRegularExpressionByKeyin interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Parameters:
nKey- the regular expression key- Returns:
- the regular expression object whose identifier is specified in parameter
-
getRegularExpressionByKey
public fr.paris.lutece.portal.business.regularexpression.RegularExpression getRegularExpressionByKey(int nKey, boolean bForEditor)return the regular expression object whose identifier is specified in parameter- Parameters:
nKey- the regular expression keybForEditor- True if the template is to be displayed in an editor- Returns:
- the regular expression object whose identifier is specified in parameter
-
getAllRegularExpression
public java.util.List<fr.paris.lutece.portal.business.regularexpression.RegularExpression> getAllRegularExpression()
return a list of regular expression- Specified by:
getAllRegularExpressionin interfacefr.paris.lutece.portal.service.regularexpression.IRegularExpressionService- Returns:
- all regular expression
-
getAllRegularExpression
public java.util.List<fr.paris.lutece.portal.business.regularexpression.RegularExpression> getAllRegularExpression(boolean bForEditor)
return a list of regular expression- Parameters:
bForEditor- True if the template is to be displayed in an editor- Returns:
- all regular expression
-
formatRichTextAttributes
public static void formatRichTextAttributes(fr.paris.lutece.portal.business.regularexpression.RegularExpression regularExpression) throws fr.paris.lutece.portal.service.editor.RichTextParsingExceptionFormat in HTML richText attributes of a regularExpression- Parameters:
regularExpression- The regularExpression to modify- Throws:
fr.paris.lutece.portal.service.editor.RichTextParsingException
-
-