fr.paris.lutece.portal.service.regularexpression
Class RegularExpressionService

java.lang.Object
  extended by fr.paris.lutece.portal.service.regularexpression.RegularExpressionService

public final class RegularExpressionService
extends java.lang.Object

this class provides services for use regular expression


Method Summary
 java.util.List<RegularExpression> getAllRegularExpression()
          return a list of regular expression
static RegularExpressionService getInstance()
          Returns the unique instance of the service
 RegularExpression getRegularExpressionByKey(int nKey)
          return the regular expression object whose identifier is specified in parameter
 boolean isAvailable()
           
 boolean isMatches(java.lang.String strValueToTest, RegularExpression regularExpression)
          return true if the value in parameter verify the regular expression
 boolean isMatches(java.lang.String strValueToTest, java.lang.String strPattern)
          return true if the value in parameter verify the pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RegularExpressionService getInstance()
Returns the unique instance of the service

Returns:
The instance of the service

isAvailable

public boolean isAvailable()
Returns:
true if the regular expression service is available

isMatches

public boolean isMatches(java.lang.String strValueToTest,
                         java.lang.String strPattern)
return true if the value in parameter verify the pattern

Parameters:
strValueToTest - the value to test
strPattern - the regular expression Pattern
Returns:
true if the value in parameter verify the pattern

isMatches

public boolean isMatches(java.lang.String strValueToTest,
                         RegularExpression regularExpression)
return true if the value in parameter verify the regular expression

Parameters:
strValueToTest - the value to test
regularExpression - the regular expression
Returns:
true if the value verify the regular expression

getRegularExpressionByKey

public RegularExpression getRegularExpressionByKey(int nKey)
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

public java.util.List<RegularExpression> getAllRegularExpression()
return a list of regular expression

Returns:
all regular expression


Copyright © 2011 Mairie de Paris. All Rights Reserved.