src/org/ohmage/domain/campaign/Campaign.java
public void addUser(
			final String username, 
			final Role role) 
			throws DomainException {
		
		if(username == null) {
			throw new DomainException("The username is null.");
		}
		else if(role == null) {
			throw new DomainException("The role is null.");
		}
		
		Collection<Role> roles = userRoles.get(username);
		if(roles == null) {
			roles = new LinkedList<Role>();
			userRoles.put(username, roles);
		}
		roles.add(role);
	}
/**
	 * Adds a user and an associated role to the list of users and their roles.
	 * 
	 * @param username The username of the user.
	 * 
	 * @param role The user's configuration role.
	 * 
	 * @throws DomainException Thrown if the username or role is null.
	 */
Adds a user and an associated role to the list of users and their roles.

@param username The username of the user.

@param role The user's configuration role.

@throws DomainException Thrown if the username or role is null.
Adds a user and an associated role to the list of users and their roles . @param username The username of the user . @param role The user ' s configuration role . @throws DomainException Thrown if the username or role is null .
public void addUser(
			final String username, 
			final Role role) 
			throws DomainException {
		if(username == null) {
			throw new DomainException("The username is null.");
		}
		else if(role == null) {
			throw new DomainException("The role is null.");
		}
		Collection<Role> roles = userRoles.get(username);
		if(roles == null) {
			roles = new LinkedList<Role>();
			userRoles.put(username, roles);
		}
		roles.add(role);
	}
public void addUser ( final String username , final Role role ) throws DomainException { if ( username == null ) { throw new DomainException ( "The username is null." ) ; } else if ( role == null ) { throw new DomainException ( "The role is null." ) ; } Collection < Role > roles = userRoles . get ( username ) ; if ( roles == null ) { roles = new LinkedList < Role > ( ) ; userRoles . put ( username , roles ) ; } roles . add ( role ) ; }
Adds a user and an associated role to the list of users and their roles.
Adds a user and an associated role to the list of users and their roles .