src/org/ohmage/request/accessrequest/AccessRequestReadRequest.java
@Override
	public void respond(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
		
		JSONObject jsonResult = new JSONObject();
		
		if (results != null){
			for(AccessRequest request : results) {
				try {
					jsonResult.put(request.getRequestId(), request.toJsonObject());
				}
				catch(JSONException e) {
					LOGGER.error("Error building the result JSONObject.", e);
					setFailed();
				}
			}
		}
		
		super.respond(httpRequest, httpResponse, jsonResult);
	}
/**
	 * Responds with success or failure and a message.
	 */
Responds with success or failure and a message.
Responds with success or failure and a message .
@Override
	public void respond(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
		JSONObject jsonResult = new JSONObject();
		if (results != null){
			for(AccessRequest request : results) {
				try {
					jsonResult.put(request.getRequestId(), request.toJsonObject());
				}
				catch(JSONException e) {
					LOGGER.error("Error building the result JSONObject.", e);
					setFailed();
				}
			}
		}
		super.respond(httpRequest, httpResponse, jsonResult);
	}
@ Override public void respond ( HttpServletRequest httpRequest , HttpServletResponse httpResponse ) { JSONObject jsonResult = new JSONObject ( ) ; if ( results != null ) { for ( AccessRequest request : results ) { try { jsonResult . put ( request . getRequestId ( ) , request . toJsonObject ( ) ) ; } catch ( JSONException e ) { LOGGER . error ( "Error building the result JSONObject." , e ) ; setFailed ( ) ; } } } super . respond ( httpRequest , httpResponse , jsonResult ) ; }
Responds with success or failure and a message.
Responds with success or failure and a message .