src/org/ohmage/domain/campaign/CampaignMask.java
public static MaskId decodeString(final String maskId)
			throws DomainException {

			if(maskId == null) {
				throw new DomainException("The mask ID is null.");
			}

			try {
				return new MaskId(UUID.fromString(maskId));
			}
			catch(IllegalArgumentException e) {
				// It is not a UUID.
			}

			throw new DomainException("The mask ID is not properly formatted.");
		}
/**
		 * Converts the string representation of a mask ID to a concrete
		 * {@link MaskId} object.
		 * 
		 * @param maskId
		 *        The string representation of the mask ID.
		 * 
		 * @return The concrete {@link MaskId} object.
		 * 
		 * @throws DomainException
		 *         The given string could not be decoded into a {@link MaskId}
		 *         object.
		 */
Converts the string representation of a mask ID to a concrete
MaskId object.

@param maskId
The string representation of the mask ID.

@return The concrete  MaskId object.

@throws DomainException
The given string could not be decoded into a  MaskId
object.
Converts the string representation of a mask ID to a concrete MaskId object . @param maskId The string representation of the mask ID . @return The concrete MaskId object . @throws DomainException The given string could not be decoded into a MaskId object .
public static MaskId decodeString(final String maskId)
			throws DomainException {
			if(maskId == null) {
				throw new DomainException("The mask ID is null.");
			}
			try {
				return new MaskId(UUID.fromString(maskId));
			}
			catch(IllegalArgumentException e) {
			}
			throw new DomainException("The mask ID is not properly formatted.");
		}
public static MaskId decodeString ( final String maskId ) throws DomainException { if ( maskId == null ) { throw new DomainException ( "The mask ID is null." ) ; } try { return new MaskId ( UUID . fromString ( maskId ) ) ; } catch ( IllegalArgumentException e ) { } throw new DomainException ( "The mask ID is not properly formatted." ) ; }
Converts the string representation of a mask ID to a concrete
 {@link MaskId} object.
Converts the string representation of a mask ID to a concrete { @link MaskId } object .
// It is not a UUID.