src/org/ohmage/validator/ObserverValidators.java
public static final String validateStreamId(
			final String value)
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		
		try {
			return Observer.Stream.sanitizeId(value);
		}
		catch(DomainException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_STREAM_ID,
				"The stream ID is invalid: " + value,
				e);
		}
	}
/**
	 * Sanitizes the stream ID.
	 * 
	 * @param value The stream ID to be sanitized.
	 * 
	 * @return The sanitized stream ID or null if the stream ID is null or only
	 * 		   whitespace.
	 * 
	 * @throws ValidationException The stream ID is invalid.
	 */
Sanitizes the stream ID.

@param value The stream ID to be sanitized.

@return The sanitized stream ID or null if the stream ID is null or only
whitespace.

@throws ValidationException The stream ID is invalid.
Sanitizes the stream ID . @param value The stream ID to be sanitized . @return The sanitized stream ID or null if the stream ID is null or only whitespace . @throws ValidationException The stream ID is invalid .
public static final String validateStreamId(
			final String value)
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return null;
		}
		try {
			return Observer.Stream.sanitizeId(value);
		}
		catch(DomainException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_STREAM_ID,
				"The stream ID is invalid: " + value,
				e);
		}
	}
public static final String validateStreamId ( final String value ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return null ; } try { return Observer . Stream . sanitizeId ( value ) ; } catch ( DomainException e ) { throw new ValidationException ( ErrorCode . OBSERVER_INVALID_STREAM_ID , "The stream ID is invalid: " + value , e ) ; } }
Sanitizes the stream ID.
Sanitizes the stream ID .