src/org/ohmage/validator/AuditValidators.java
public static ResponseType validateResponseType(final String responseType) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(responseType)) {
			return null;
		}
		
		try {
			return ResponseType.valueOf(responseType.trim().toUpperCase());
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
					"Invalid request type given: " + responseType, 
					e
				);
		}
	}
/**
	 * Validates that the response time is a valid response time and returns a
	 * ResponseType object based on its value, unless its null or whitespace
	 * only in which case null is returned.
	 * 
	 * @param responseType The response type as a string.
	 * 
	 * @return Returns null if the response type was null or whitespace only;
	 * 		   otherwise, a ResponseType object is returned based on the 
	 * 		   response type.
	 * 
	 * @throws ValidationException Thrown if the response type is not null, not
	 * 							   whitespace only, and not a valid response
	 * 							   type.
	 */
Validates that the response time is a valid response time and returns a
ResponseType object based on its value, unless its null or whitespace
only in which case null is returned.

@param responseType The response type as a string.

@return Returns null if the response type was null or whitespace only;
otherwise, a ResponseType object is returned based on the
response type.

@throws ValidationException Thrown if the response type is not null, not
whitespace only, and not a valid response
type.
Validates that the response time is a valid response time and returns a ResponseType object based on its value unless its null or whitespace only in which case null is returned . @param responseType The response type as a string . @return Returns null if the response type was null or whitespace only ; otherwise a ResponseType object is returned based on the response type . @throws ValidationException Thrown if the response type is not null not whitespace only and not a valid response type .
public static ResponseType validateResponseType(final String responseType) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(responseType)) {
			return null;
		}
		try {
			return ResponseType.valueOf(responseType.trim().toUpperCase());
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
					"Invalid request type given: " + responseType, 
					e
				);
		}
	}
public static ResponseType validateResponseType ( final String responseType ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( responseType ) ) { return null ; } try { return ResponseType . valueOf ( responseType . trim ( ) . toUpperCase ( ) ) ; } catch ( IllegalArgumentException e ) { throw new ValidationException ( "Invalid request type given: " + responseType , e ) ; } }
Validates that the response time is a valid response time and returns a
 ResponseType object based on its value, unless its null or whitespace
 only in which case null is returned.
Validates that the response time is a valid response time and returns a ResponseType object based on its value unless its null or whitespace only in which case null is returned .