src/org/ohmage/cache/OmhThirdPartyRegistration.java
public static void registerDomain(
		final String domain,
		final PayloadIdBuilder builder)
		throws IllegalArgumentException {
		
		// Null check.
		if(domain == null) {
			throw new IllegalArgumentException("The domain is null.");
		}
		else if(builder == null) {
			throw
				new IllegalArgumentException("The PayloadId builder is null.");
		}
		
		// Make sure the domain hasn't already been registered.
		if(REGISTRY.containsKey(domain)) {
			throw
				new IllegalArgumentException(
					"The domain has already been registered: " + domain);
		}
		
		// Add the domain to the registry.
		REGISTRY.put(domain, builder);
	}
/**
	 * Registers a new domain and its corresponding {@link PayloadId} class.
	 * 
	 * @param domain
	 *        The string representing the domain.
	 * 
	 * @param clazz
	 *        The {@link PayloadId} class that can handle this domain.
	 * 
	 * @throws IllegalArgumentException
	 *         A parameter was invalid.
	 */
Registers a new domain and its corresponding  PayloadId class.

@param domain
The string representing the domain.

@param clazz
The  PayloadId class that can handle this domain.

@throws IllegalArgumentException
A parameter was invalid.
Registers a new domain and its corresponding PayloadId class . @param domain The string representing the domain . @param clazz The PayloadId class that can handle this domain . @throws IllegalArgumentException A parameter was invalid .
public static void registerDomain(
		final String domain,
		final PayloadIdBuilder builder)
		throws IllegalArgumentException {
		if(domain == null) {
			throw new IllegalArgumentException("The domain is null.");
		}
		else if(builder == null) {
			throw
				new IllegalArgumentException("The PayloadId builder is null.");
		}
		if(REGISTRY.containsKey(domain)) {
			throw
				new IllegalArgumentException(
					"The domain has already been registered: " + domain);
		}
		REGISTRY.put(domain, builder);
	}
public static void registerDomain ( final String domain , final PayloadIdBuilder builder ) throws IllegalArgumentException { if ( domain == null ) { throw new IllegalArgumentException ( "The domain is null." ) ; } else if ( builder == null ) { throw new IllegalArgumentException ( "The PayloadId builder is null." ) ; } if ( REGISTRY . containsKey ( domain ) ) { throw new IllegalArgumentException ( "The domain has already been registered: " + domain ) ; } REGISTRY . put ( domain , builder ) ; }
Registers a new domain and its corresponding {@link PayloadId} class.
Registers a new domain and its corresponding { @link PayloadId } class .
// Null check. // Make sure the domain hasn't already been registered. // Add the domain to the registry.