src/org/ohmage/lib/OhmageApi.java
public List<String> uploadRoster(final String authenticationToken,
			final String client, final String roster)
			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.ROSTER, roster);
		
		JSONArray warningMessages;
		try {
			warningMessages = new JSONArray(
					processJsonResponse(
							makeRequest(
									new URL(url.toString() + RequestBuilder.getInstance().getApiClassRosterUpdate()), 
									parameters, 
									true
								),
							ClassRosterUpdateRequest.KEY_WARNING_MESSAGES
						)
				);
		}
		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);
		}
		catch(JSONException e) {
			throw new ApiException("The warning messages were not valid JSON.", e);
		}
		
		int numWarningMessages = warningMessages.length();
		List<String> result = new ArrayList<String>(numWarningMessages);
		for(int i = 0; i < numWarningMessages; i++) {
			try {
				result.add(warningMessages.getString(i));
			} 
			catch(JSONException e) {
				throw new ApiException("An error message was not a String.", e);
			}
		}
		
		return result;
	}
/**
	 * Uploads a class roster to update some classes and returns warning 
	 * messages if something happened that wasn't fatal but the user probably
	 * needs to know.
	 * 
	 * @param authenticationToken The user's authentication token.
	 * 
	 * @param client The client value.
	 * 
	 * @param roster The roster.
	 * 
	 * @return The warning messages from the server.
	 * 
	 * @throws ApiException Thrown if there is a library error.
	 * 
	 * @throws RequestErrorException Thrown if the server returns an error.
	 */
Uploads a class roster to update some classes and returns warning
messages if something happened that wasn't fatal but the user probably
needs to know.

@param authenticationToken The user's authentication token.

@param client The client value.

@param roster The roster.

@return The warning messages from the server.

@throws ApiException Thrown if there is a library error.

@throws RequestErrorException Thrown if the server returns an error.
Uploads a class roster to update some classes and returns warning messages if something happened that wasn ' t fatal but the user probably needs to know . @param authenticationToken The user ' s authentication token . @param client The client value . @param roster The roster . @return The warning messages from the server . @throws ApiException Thrown if there is a library error . @throws RequestErrorException Thrown if the server returns an error .
public List<String> uploadRoster(final String authenticationToken,
			final String client, final String roster)
			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.ROSTER, roster);
		JSONArray warningMessages;
		try {
			warningMessages = new JSONArray(
					processJsonResponse(
							makeRequest(
									new URL(url.toString() + RequestBuilder.getInstance().getApiClassRosterUpdate()), 
									parameters, 
									true
								),
							ClassRosterUpdateRequest.KEY_WARNING_MESSAGES
						)
				);
		}
		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);
		}
		catch(JSONException e) {
			throw new ApiException("The warning messages were not valid JSON.", e);
		}
		int numWarningMessages = warningMessages.length();
		List<String> result = new ArrayList<String>(numWarningMessages);
		for(int i = 0; i < numWarningMessages; i++) {
			try {
				result.add(warningMessages.getString(i));
			} 
			catch(JSONException e) {
				throw new ApiException("An error message was not a String.", e);
			}
		}
		return result;
	}
public List < String > uploadRoster ( final String authenticationToken , final String client , final String roster ) 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 . ROSTER , roster ) ; JSONArray warningMessages ; try { warningMessages = new JSONArray ( processJsonResponse ( makeRequest ( new URL ( url . toString ( ) + RequestBuilder . getInstance ( ) . getApiClassRosterUpdate ( ) ) , parameters , true ) , ClassRosterUpdateRequest . KEY_WARNING_MESSAGES ) ) ; } 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 ) ; } catch ( JSONException e ) { throw new ApiException ( "The warning messages were not valid JSON." , e ) ; } int numWarningMessages = warningMessages . length ( ) ; List < String > result = new ArrayList < String > ( numWarningMessages ) ; for ( int i = 0 ; i < numWarningMessages ; i ++ ) { try { result . add ( warningMessages . getString ( i ) ) ; } catch ( JSONException e ) { throw new ApiException ( "An error message was not a String." , e ) ; } } return result ; }
Uploads a class roster to update some classes and returns warning
 messages if something happened that wasn't fatal but the user probably
 needs to know.
Uploads a class roster to update some classes and returns warning messages if something happened that wasn ' t fatal but the user probably needs to know .