src/org/ohmage/validator/UserValidators.java
public static Boolean validateUserSetupPrivilegeValue(
		final String value)
		throws ValidationException {
		
		LOGGER
			.info(
				"Validating that the value is a valid user setup " +
					"privilege value.");
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		if(StringUtils.isValidBoolean(value.trim())) {
			return StringUtils.decodeBoolean(value.trim());
		}
		else {
			throw new ValidationException(
					ErrorCode.USER_INVALID_USER_SETUP_PRIVILEGE, 
					"The user setup privilege value is invalid: " + value);
		}
	}
/**
	 * Validates that a value is a valid user setup privilege value. If the
	 * value is null or whitespace only, null is returned. If the value is a
	 * valid user setup privilege value, it is returned. If the value is not
	 * null, not whitespace only, and not a valid user setup privilege value,
	 * a ValidationException is thrown.
	 * 
	 * @param value
	 *        The String representation of the user setup privilege value to be
	 *        validated.
	 * 
	 * @return Returns null if the value is null or whitespace only; otherwise,
	 *         the value is returned.
	 * 
	 * @throws ValidationException
	 *         Thrown if the value is not null, not whitespace only, and not a
	 *         valid user setup privilege value.
	 */
Validates that a value is a valid user setup privilege value. If the
value is null or whitespace only, null is returned. If the value is a
valid user setup privilege value, it is returned. If the value is not
null, not whitespace only, and not a valid user setup privilege value,
a ValidationException is thrown.

@param value
The String representation of the user setup privilege value to be
validated.

@return Returns null if the value is null or whitespace only; otherwise,
the value is returned.

@throws ValidationException
Thrown if the value is not null, not whitespace only, and not a
valid user setup privilege value.
Validates that a value is a valid user setup privilege value . If the value is null or whitespace only null is returned . If the value is a valid user setup privilege value it is returned . If the value is not null not whitespace only and not a valid user setup privilege value a ValidationException is thrown . @param value The String representation of the user setup privilege value to be validated . @return Returns null if the value is null or whitespace only ; otherwise the value is returned . @throws ValidationException Thrown if the value is not null not whitespace only and not a valid user setup privilege value .
public static Boolean validateUserSetupPrivilegeValue(
		final String value)
		throws ValidationException {
		LOGGER
			.info(
				"Validating that the value is a valid user setup " +
					"privilege value.");
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		if(StringUtils.isValidBoolean(value.trim())) {
			return StringUtils.decodeBoolean(value.trim());
		}
		else {
			throw new ValidationException(
					ErrorCode.USER_INVALID_USER_SETUP_PRIVILEGE, 
					"The user setup privilege value is invalid: " + value);
		}
	}
public static Boolean validateUserSetupPrivilegeValue ( final String value ) throws ValidationException { LOGGER . info ( "Validating that the value is a valid user setup " + "privilege value." ) ; if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } if ( StringUtils . isValidBoolean ( value . trim ( ) ) ) { return StringUtils . decodeBoolean ( value . trim ( ) ) ; } else { throw new ValidationException ( ErrorCode . USER_INVALID_USER_SETUP_PRIVILEGE , "The user setup privilege value is invalid: " + value ) ; } }
Validates that a value is a valid user setup privilege value.
Validates that a value is a valid user setup privilege value .