@SuppressWarnings("fallthrough") private static void validateCSVRequest(ExportCSVDataRequestMsg request) { if (request.getExportType() == null) { throw new IllegalArgumentException("specify an export type"); } switch (request.getExportType()) { case AUDIT_LOGS: break; case AVAILABILITY: if (request.isAllServices() == null && request.getURLs().isEmpty()) { throw new IllegalArgumentException("either all services needs to be set, or specify a list of urls from which to export data."); } break; case STATISTICS: if (request.isAllServices() == null && request.getURLs().isEmpty()) { throw new IllegalArgumentException("either all services needs to be set, or specify a list of urls from which to export data."); } break; case TRANSACTIONS: if (request.isAllServices() == null && request.getURLs().isEmpty()) { throw new IllegalArgumentException("either all services needs to be set, or specify a list of urls from which to export data."); } case MACHINE: case PROCESS: if (request.isAllServices() == null && request.getURLs().isEmpty()) { throw new IllegalArgumentException("either all services needs to be set, or specify a list of urls from which to export data."); } break; } }
List<String> urlstoprocess = urlListAudit(request.isAllServices(), request.getURLs(), currentuser, request.getClassification(), ctx);
x.setAllServices(false); x.setExportType(get.getExportCSVDataRequestMsg().getExportType()); x.getURLs().addAll(get.getExportCSVDataRequestMsg().getURLs()); x.setRange(convertDiffRangeToRange(get.getExportCSVDataRequestMsg().getRange()));