src/org/ohmage/validator/ObserverValidators.java
public static final Long validateStreamVersion(
			final String value)
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		try {
			return Long.valueOf(value);
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_STREAM_VERSION,
				"The value is not a valid number: " + value,
				e);
		}
	}
/**
	 * Validates that an stream version is valid.
	 * 
	 * @param value The stream version as a string.
	 * 
	 * @return The stream version as a long or null if the value was null or
	 * 		   only whitespace.
	 * 
	 * @throws ValidationException The stream version is invalid.
	 */
Validates that an stream version is valid.

@param value The stream version as a string.

@return The stream version as a long or null if the value was null or
only whitespace.

@throws ValidationException The stream version is invalid.
Validates that an stream version is valid . @param value The stream version as a string . @return The stream version as a long or null if the value was null or only whitespace . @throws ValidationException The stream version is invalid .
public static final Long validateStreamVersion(
			final String value)
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		try {
			return Long.valueOf(value);
		}
		catch(NumberFormatException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_STREAM_VERSION,
				"The value is not a valid number: " + value,
				e);
		}
	}
public static final Long validateStreamVersion ( final String value ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } try { return Long . valueOf ( value ) ; } catch ( NumberFormatException e ) { throw new ValidationException ( ErrorCode . OBSERVER_INVALID_STREAM_VERSION , "The value is not a valid number: " + value , e ) ; } }
Validates that an stream version is valid.
Validates that an stream version is valid .