src/org/ohmage/lib/OhmageApi.java
public void updateClass(final String authenticationToken, 
			final String client, final String classId, final String newName,
			final String newDescription, 
			final Map<String, Clazz.Role> usersToAdd, 
			final Collection<String> usersToRemove)
			throws ApiException, RequestErrorException {
		
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put(InputKeys.AUTH_TOKEN, authenticationToken);
		parameters.put(InputKeys.CLIENT, client);
		parameters.put(InputKeys.CLASS_URN, classId);
		parameters.put(InputKeys.CLASS_NAME, newName);
		parameters.put(InputKeys.DESCRIPTION, newDescription);
		
		if(usersToAdd != null) {
			parameters.put(InputKeys.USER_ROLE_LIST_ADD, StringUtils.mapToStringList(usersToAdd, InputKeys.ENTITY_ROLE_SEPARATOR, InputKeys.LIST_ITEM_SEPARATOR));
		}
		if(usersToRemove != null) {
			parameters.put(InputKeys.USER_LIST_REMOVE, StringUtils.collectionToStringList(usersToRemove, InputKeys.LIST_ITEM_SEPARATOR));
		}
		
		try {
			makeRequest(
					new URL(url.toString() + RequestBuilder.getInstance().getApiClassUpdate()), 
					parameters, 
					false
				);
		}
		catch(MalformedURLException e) {
			throw new ApiException("The URL was incorrectly created.", e);
		}
		catch(IllegalArgumentException e) {
			throw new ApiException("The response was not proper JSON.", e);
		}
	}
/**
	 * Updates a class with the given information.
	 * 
	 * @param authenticationToken The user's authentication token.
	 * 
	 * @param client The client value.
	 * 
	 * @param classId The unique identifier for the class to update.
	 * 
	 * @param newName The class' new name. Optional.
	 * 
	 * @param newDescription The class' new description. Optional.
	 * 
	 * @param usersToAdd A map of usernames to class role to add to the class.
	 * 					 Optional.
	 * 
	 * @param usersToRemove A list of classes to remove. Optional.
	 * 
	 * @throws ApiException Thrown if there is a library error.
	 * 
	 * @throws RequestErrorException Thrown if the server returns an error.
	 */
Updates a class with the given information.

@param authenticationToken The user's authentication token.

@param client The client value.

@param classId The unique identifier for the class to update.

@param newName The class' new name. Optional.

@param newDescription The class' new description. Optional.

@param usersToAdd A map of usernames to class role to add to the class.
Optional.

@param usersToRemove A list of classes to remove. Optional.

@throws ApiException Thrown if there is a library error.

@throws RequestErrorException Thrown if the server returns an error.
Updates a class with the given information . @param authenticationToken The user ' s authentication token . @param client The client value . @param classId The unique identifier for the class to update . @param newName The class ' new name . Optional . @param newDescription The class ' new description . Optional . @param usersToAdd A map of usernames to class role to add to the class . Optional . @param usersToRemove A list of classes to remove . Optional . @throws ApiException Thrown if there is a library error . @throws RequestErrorException Thrown if the server returns an error .
public void updateClass(final String authenticationToken, 
			final String client, final String classId, final String newName,
			final String newDescription, 
			final Map<String, Clazz.Role> usersToAdd, 
			final Collection<String> usersToRemove)
			throws ApiException, RequestErrorException {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put(InputKeys.AUTH_TOKEN, authenticationToken);
		parameters.put(InputKeys.CLIENT, client);
		parameters.put(InputKeys.CLASS_URN, classId);
		parameters.put(InputKeys.CLASS_NAME, newName);
		parameters.put(InputKeys.DESCRIPTION, newDescription);
		if(usersToAdd != null) {
			parameters.put(InputKeys.USER_ROLE_LIST_ADD, StringUtils.mapToStringList(usersToAdd, InputKeys.ENTITY_ROLE_SEPARATOR, InputKeys.LIST_ITEM_SEPARATOR));
		}
		if(usersToRemove != null) {
			parameters.put(InputKeys.USER_LIST_REMOVE, StringUtils.collectionToStringList(usersToRemove, InputKeys.LIST_ITEM_SEPARATOR));
		}
		try {
			makeRequest(
					new URL(url.toString() + RequestBuilder.getInstance().getApiClassUpdate()), 
					parameters, 
					false
				);
		}
		catch(MalformedURLException e) {
			throw new ApiException("The URL was incorrectly created.", e);
		}
		catch(IllegalArgumentException e) {
			throw new ApiException("The response was not proper JSON.", e);
		}
	}
public void updateClass ( final String authenticationToken , final String client , final String classId , final String newName , final String newDescription , final Map < String , Clazz . Role > usersToAdd , final Collection < String > usersToRemove ) throws ApiException , RequestErrorException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( InputKeys . AUTH_TOKEN , authenticationToken ) ; parameters . put ( InputKeys . CLIENT , client ) ; parameters . put ( InputKeys . CLASS_URN , classId ) ; parameters . put ( InputKeys . CLASS_NAME , newName ) ; parameters . put ( InputKeys . DESCRIPTION , newDescription ) ; if ( usersToAdd != null ) { parameters . put ( InputKeys . USER_ROLE_LIST_ADD , StringUtils . mapToStringList ( usersToAdd , InputKeys . ENTITY_ROLE_SEPARATOR , InputKeys . LIST_ITEM_SEPARATOR ) ) ; } if ( usersToRemove != null ) { parameters . put ( InputKeys . USER_LIST_REMOVE , StringUtils . collectionToStringList ( usersToRemove , InputKeys . LIST_ITEM_SEPARATOR ) ) ; } try { makeRequest ( new URL ( url . toString ( ) + RequestBuilder . getInstance ( ) . getApiClassUpdate ( ) ) , parameters , false ) ; } catch ( MalformedURLException e ) { throw new ApiException ( "The URL was incorrectly created." , e ) ; } catch ( IllegalArgumentException e ) { throw new ApiException ( "The response was not proper JSON." , e ) ; } }
Updates a class with the given information.
Updates a class with the given information .