src/org/ohmage/validator/ObserverValidators.java
public static final Observer validateObserverDefinitionXml(
			final String definition)
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(definition)) {
			return null;
		}
		
		try {
			return new Observer(definition);
		}
		catch(DomainException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_DEFINITION,
				e.getMessage(),
				e);
		}
	}
/**
	 * Validates that a observer definition is valid and creates a Observer from it.
	 * 
	 * @param definition The XML definition as a String.
	 * 
	 * @return The Observer represented by the definition or NULL if the
	 * 		   definition is null or only whitespace.
	 * 
	 * @throws ValidationException The observer definition was not valid.
	 */
Validates that a observer definition is valid and creates a Observer from it.

@param definition The XML definition as a String.

@return The Observer represented by the definition or NULL if the
definition is null or only whitespace.

@throws ValidationException The observer definition was not valid.
Validates that a observer definition is valid and creates a Observer from it . @param definition The XML definition as a String . @return The Observer represented by the definition or NULL if the definition is null or only whitespace . @throws ValidationException The observer definition was not valid .
public static final Observer validateObserverDefinitionXml(
			final String definition)
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(definition)) {
			return null;
		}
		try {
			return new Observer(definition);
		}
		catch(DomainException e) {
			throw new ValidationException(
				ErrorCode.OBSERVER_INVALID_DEFINITION,
				e.getMessage(),
				e);
		}
	}
public static final Observer validateObserverDefinitionXml ( final String definition ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( definition ) ) { return null ; } try { return new Observer ( definition ) ; } catch ( DomainException e ) { throw new ValidationException ( ErrorCode . OBSERVER_INVALID_DEFINITION , e . getMessage ( ) , e ) ; } }
Validates that a observer definition is valid and creates a Observer from it.
Validates that a observer definition is valid and creates a Observer from it .