src/org/ohmage/validator/OmhValidators.java
public static Long validatePayloadVersion(
			final String value)
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		try {
			return Long.decode(value);
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
				ErrorCode.OMH_INVALID_PAYLOAD_VERSION,
				"The payload version is not a whole number: " +
					value);
		}
	}
/**
	 * Validates that a payload version string is a valid payload version and
	 * then returns it.
	 * 
	 * @param value The value to validate.
	 * 
	 * @return The long value representation of the version.
	 * 
	 * @throws ValidationException The version was not a valid number.
	 */
Validates that a payload version string is a valid payload version and
then returns it.

@param value The value to validate.

@return The long value representation of the version.

@throws ValidationException The version was not a valid number.
Validates that a payload version string is a valid payload version and then returns it . @param value The value to validate . @return The long value representation of the version . @throws ValidationException The version was not a valid number .
public static Long validatePayloadVersion(
			final String value)
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		try {
			return Long.decode(value);
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
				ErrorCode.OMH_INVALID_PAYLOAD_VERSION,
				"The payload version is not a whole number: " +
					value);
		}
	}
public static Long validatePayloadVersion ( final String value ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } try { return Long . decode ( value ) ; } catch ( NumberFormatException e ) { throw new ValidationException ( ErrorCode . OMH_INVALID_PAYLOAD_VERSION , "The payload version is not a whole number: " + value ) ; } }
Validates that a payload version string is a valid payload version and
 then returns it.
Validates that a payload version string is a valid payload version and then returns it .