org.rhq.enterprise.communications.util.prefs
Class RegexSetupValidityChecker

java.lang.Object
  extended by org.rhq.enterprise.communications.util.prefs.RegexSetupValidityChecker
All Implemented Interfaces:
SetupValidityChecker

public class RegexSetupValidityChecker
extends Object
implements SetupValidityChecker

A validity checker that validates that the new value is a valid boolean (true or false).

Author:
Joseph Marques

Constructor Summary
RegexSetupValidityChecker(String regexPattern, int flags, String resourceKeyName, Object... resourceKeyArguments)
           
RegexSetupValidityChecker(String regexPattern, String resourceKeyName, Object... resourceKeyArguments)
           
 
Method Summary
 boolean checkValidity(String pref_name, String value_to_check, Preferences preferences, PrintWriter out)
          Makes sure the new value is either "true" or "false".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexSetupValidityChecker

public RegexSetupValidityChecker(String regexPattern,
                                 String resourceKeyName,
                                 Object... resourceKeyArguments)

RegexSetupValidityChecker

public RegexSetupValidityChecker(String regexPattern,
                                 int flags,
                                 String resourceKeyName,
                                 Object... resourceKeyArguments)
Method Detail

checkValidity

public boolean checkValidity(String pref_name,
                             String value_to_check,
                             Preferences preferences,
                             PrintWriter out)
Makes sure the new value is either "true" or "false".

Specified by:
checkValidity in interface SetupValidityChecker
Parameters:
pref_name - the name of the preference being checked
value_to_check - the value to check
preferences - the full set of preferences
out - an output stream this instruction can use to print out any error messages that it deems appropriate
Returns:
true if value_to_check is valid; false otherwise
See Also:
SetupValidityChecker.checkValidity(String, String, Preferences, PrintWriter)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.