src/org/ohmage/domain/AccessRequest.java
public static Collection<String> validateRequestIdList(
			final String requestIdListString) throws ValidationException {
		
		LOGGER.info("Validating the list of request ids.");
		
		// If the class list is an empty string, then we return null.
		if(StringUtils.isEmptyOrWhitespaceOnly(requestIdListString)) {
			return null;
		}
				
		// Otherwise, attempt to parse and evaluate the list

		// Create the list of class IDs to be returned to the caller.
		Set<String> requestIdList = new HashSet<String>();

		String[] requestListArray = requestIdListString.split(InputKeys.LIST_ITEM_SEPARATOR);
		if (requestListArray.length > MAX_LIST_LENGTH) {
			throw new ValidationException(
					ErrorCode.USER_ACCESS_REQUEST_INVALID_PRAMETER, 
					"The list cannot exceed the maximum length of " + MAX_LIST_LENGTH);	
		}
		
		for (String requestId : requestListArray) {
			// Validate the current request ID.
			try {
				String currRequestId = validateRequestId(requestId);
			
				// if it is null, then ignore since it is due to white space.
				if(currRequestId != null) {
					requestIdList.add(currRequestId);
				} 
			} catch (ValidationException e) {
				throw new ValidationException(
						ErrorCode.USER_ACCESS_REQUEST_INVALID_PRAMETER, 
						"The lsit contains invalid uuid(s): " + requestId);
				
			}
		}
		
		return requestIdList;
	}
/**
	 * Validates that all of the request identifiers in a list String are valid 
	 * UUIDs. If the requestIdListString is null or whitespace only, it will 
	 * return null. If not, it will attempt to parse the string and evaluate each 
	 * of the request id in the list. If any id is invalid, it will return an error 
	 * message.
	 *  
	 * @param requestIdListString The request id list as a string where each item is
	 * 							separated by
	 * 						  	{@value org.ohmage.request.InputKeys#LIST_ITEM_SEPARATOR}.
	 * 
	 * @return Returns a list of request ids derived from the supplied argument, 
	 * 		   or null if argument is null, whitespace only, or
	 * 		   would otherwise be empty because it doesn't contain any 
	 * 		   meaningful data.
	 * 
	 * @throws ValidationException Thrown if the request Id list string contains an
	 * 							 invalid UUID.
	 */
Validates that all of the request identifiers in a list String are valid
UUIDs. If the requestIdListString is null or whitespace only, it will
return null. If not, it will attempt to parse the string and evaluate each
of the request id in the list. If any id is invalid, it will return an error
message.

@param requestIdListString The request id list as a string where each item is
separated by
org.ohmage.request.InputKeys#LIST_ITEM_SEPARATOR.

@return Returns a list of request ids derived from the supplied argument,
or null if argument is null, whitespace only, or
would otherwise be empty because it doesn't contain any
meaningful data.

@throws ValidationException Thrown if the request Id list string contains an
invalid UUID.
Validates that all of the request identifiers in a list String are valid UUIDs . If the requestIdListString is null or whitespace only it will return null . If not it will attempt to parse the string and evaluate each of the request id in the list . If any id is invalid it will return an error message . @param requestIdListString The request id list as a string where each item is separated by org . ohmage . request . InputKeys#LIST_ITEM_SEPARATOR . @return Returns a list of request ids derived from the supplied argument or null if argument is null whitespace only or would otherwise be empty because it doesn ' t contain any meaningful data . @throws ValidationException Thrown if the request Id list string contains an invalid UUID .
public static Collection<String> validateRequestIdList(
			final String requestIdListString) throws ValidationException {
		LOGGER.info("Validating the list of request ids.");
		if(StringUtils.isEmptyOrWhitespaceOnly(requestIdListString)) {
			return null;
		}
		Set<String> requestIdList = new HashSet<String>();
		String[] requestListArray = requestIdListString.split(InputKeys.LIST_ITEM_SEPARATOR);
		if (requestListArray.length > MAX_LIST_LENGTH) {
			throw new ValidationException(
					ErrorCode.USER_ACCESS_REQUEST_INVALID_PRAMETER, 
					"The list cannot exceed the maximum length of " + MAX_LIST_LENGTH);	
		}
		for (String requestId : requestListArray) {
			try {
				String currRequestId = validateRequestId(requestId);
				if(currRequestId != null) {
					requestIdList.add(currRequestId);
				} 
			} catch (ValidationException e) {
				throw new ValidationException(
						ErrorCode.USER_ACCESS_REQUEST_INVALID_PRAMETER, 
						"The lsit contains invalid uuid(s): " + requestId);
			}
		}
		return requestIdList;
	}
public static Collection < String > validateRequestIdList ( final String requestIdListString ) throws ValidationException { LOGGER . info ( "Validating the list of request ids." ) ; if ( StringUtils . isEmptyOrWhitespaceOnly ( requestIdListString ) ) { return null ; } Set < String > requestIdList = new HashSet < String > ( ) ; String [ ] requestListArray = requestIdListString . split ( InputKeys . LIST_ITEM_SEPARATOR ) ; if ( requestListArray . length > MAX_LIST_LENGTH ) { throw new ValidationException ( ErrorCode . USER_ACCESS_REQUEST_INVALID_PRAMETER , "The list cannot exceed the maximum length of " + MAX_LIST_LENGTH ) ; } for ( String requestId : requestListArray ) { try { String currRequestId = validateRequestId ( requestId ) ; if ( currRequestId != null ) { requestIdList . add ( currRequestId ) ; } } catch ( ValidationException e ) { throw new ValidationException ( ErrorCode . USER_ACCESS_REQUEST_INVALID_PRAMETER , "The lsit contains invalid uuid(s): " + requestId ) ; } } return requestIdList ; }
Validates that all of the request identifiers in a list String are valid
 UUIDs.
Validates that all of the request identifiers in a list String are valid UUIDs .
// If the class list is an empty string, then we return null. // Otherwise, attempt to parse and evaluate the list // Create the list of class IDs to be returned to the caller. // Validate the current request ID. // if it is null, then ignore since it is due to white space.