View Javadoc

1   /*
2    * $Id: NumberFilter.java,v 1.1 2007/11/29 12:58:13 oeuillot Exp $
3    */
4   package org.rcfaces.core.internal.validator.impl;
5   
6   import java.util.regex.Pattern;
7   
8   import org.apache.commons.logging.Log;
9   import org.apache.commons.logging.LogFactory;
10  import org.rcfaces.core.validator.IClientValidatorContext;
11  
12  /**
13   * 
14   * @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
15   * @version $Revision: 1.1 $ $Date: 2007/11/29 12:58:13 $
16   */
17  public class NumberFilter extends AbstractPatternTask {
18      private static final String REVISION = "$Revision: 1.1 $";
19  
20      private static final Log LOG = LogFactory.getLog(NumberFilter.class);
21  
22      private static final Pattern NUMBER_PATTERN = Pattern
23              .compile("[0-9\\,\\-]");
24  
25      protected Pattern getPattern(IClientValidatorContext context) {
26  
27          return NUMBER_PATTERN;
28      }
29  
30  }