src/org/ohmage/validator/MobilityValidators.java
public static UUID validateMobilityId(
			final String value) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		try {
			return UUID.fromString(value);
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
				ErrorCode.MOBILITY_INVALID_ID,
				"The Mobility ID is not a valid ID: " +
					value,
				e);
		}
	}
/**
	 * Validates that a Mobility ID is a valid ID.
	 * 
	 * @param value The value to be validated.
	 * 
	 * @return The validated Mobility ID or null if the value was null or only
	 * 		   whitespace.
	 * 
	 * @throws ValidationException The value was not a valid Mobility ID.
	 */
Validates that a Mobility ID is a valid ID.

@param value The value to be validated.

@return The validated Mobility ID or null if the value was null or only
whitespace.

@throws ValidationException The value was not a valid Mobility ID.
Validates that a Mobility ID is a valid ID . @param value The value to be validated . @return The validated Mobility ID or null if the value was null or only whitespace . @throws ValidationException The value was not a valid Mobility ID .
public static UUID validateMobilityId(
			final String value) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		try {
			return UUID.fromString(value);
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
				ErrorCode.MOBILITY_INVALID_ID,
				"The Mobility ID is not a valid ID: " +
					value,
				e);
		}
	}
public static UUID validateMobilityId ( final String value ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } try { return UUID . fromString ( value ) ; } catch ( IllegalArgumentException e ) { throw new ValidationException ( ErrorCode . MOBILITY_INVALID_ID , "The Mobility ID is not a valid ID: " + value , e ) ; } }
Validates that a Mobility ID is a valid ID.
Validates that a Mobility ID is a valid ID .