src/org/ohmage/jee/filter/ClientFilter.java
private final String retrieveRequester(
			final Map<String, String[]> parameters)
			throws InvalidClientException {
		
		// Get the list of requesters.
		String[] requesters = parameters.get(InputKeys.OMH_REQUESTER);
		
		// If there were no requester values, return null.
		if(requesters == null) {
			return null;
		}
		
		// If there are multiple requesters, throw an error.
		if(requesters.length > 1) {
			throw
				new InvalidClientException(
					"More than one requester value was given.");
		}
		else if(requesters.length == 1) {
			// Get the requester.
			return validateClient(requesters[0]);
		}
		
		// If there was no requester value, return null.
		return null;
	}
/**
	 * Validates the requester value from the parameters.
	 * 
	 * @param parameters The parameters already decoded from the HTTP request.
	 * 
	 * @return The requester value.
	 * 
	 * @throws InvalidClientException Multiple requester values were given or 
	 * 								  the one given requester value was
	 * 								  invalid.
	 */
Validates the requester value from the parameters.

@param parameters The parameters already decoded from the HTTP request.

@return The requester value.

@throws InvalidClientException Multiple requester values were given or
the one given requester value was
invalid.
Validates the requester value from the parameters . @param parameters The parameters already decoded from the HTTP request . @return The requester value . @throws InvalidClientException Multiple requester values were given or the one given requester value was invalid .
private final String retrieveRequester(
			final Map<String, String[]> parameters)
			throws InvalidClientException {
		String[] requesters = parameters.get(InputKeys.OMH_REQUESTER);
		if(requesters == null) {
			return null;
		}
		if(requesters.length > 1) {
			throw
				new InvalidClientException(
					"More than one requester value was given.");
		}
		else if(requesters.length == 1) {
			return validateClient(requesters[0]);
		}
		return null;
	}
private final String retrieveRequester ( final Map < String , String [ ] > parameters ) throws InvalidClientException { String [ ] requesters = parameters . get ( InputKeys . OMH_REQUESTER ) ; if ( requesters == null ) { return null ; } if ( requesters . length > 1 ) { throw new InvalidClientException ( "More than one requester value was given." ) ; } else if ( requesters . length == 1 ) { return validateClient ( requesters [ 0 ] ) ; } return null ; }
Validates the requester value from the parameters.
Validates the requester value from the parameters .
// Get the list of requesters. // If there were no requester values, return null. // If there are multiple requesters, throw an error. // Get the requester. // If there was no requester value, return null.