/** * Create an instance of {@link ExportDataRequestMsg } * */ public ExportDataRequestMsg createExportDataRequestMsg() { return new ExportDataRequestMsg(); }
private String buildAllServiceList(ExportDataRequestMsg request, String currentUser) { List<String> urls = urlListRead(request.isAllServices(), request.getURLs(), currentUser, request.getClassification()); StringBuilder list = new StringBuilder(); for (int i = 0; i < urls.size(); i++) { list.append("<li>").append(Utility.encodeHTML(urls.get(i))).append("</li>\n"); } return list.toString(); }
Utility.validateClassification(request.getClassification()); AuditLogger.logItem(this.getClass().getCanonicalName(), "exportDataToHTML", currentUser, "", (request.getClassification()), ctx!=null? ctx.getMessageContext():null); if (request.getRange() == null || request.getRange().getEnd() == null || request.getRange().getStart() == null) { throw new IllegalArgumentException("range is null"); if (request.getReportTypes() == null || request.getReportTypes().getReportTypeContainer() == null || request.getReportTypes().getReportTypeContainer().isEmpty()) { throw new IllegalArgumentException("ReportTypes is null, at least one must be specified"); if (request.isAllServices() == false && (request.getURLs() == null || request.getURLs().isEmpty())) { throw new IllegalArgumentException("AllServices must be true or at least one URL must be specified"); time = request.getRange().getStart(); header = header.replaceAll("%DATETIME_FROM%", time.getTime().toString()); time = request.getRange().getEnd(); header = header.replaceAll("%DATETIME_TO%", time.getTime().toString()); if (request.getClassification() == null) { request.setClassification(getClassLevelFromDB()); header = header.replaceAll("%CLASSIFICATION%", (Utility.ICMClassificationToString(request.getClassification().getClassification()) + " - " + request.getClassification().getCaveats())); header = header.replaceAll("%COLOR%", Utility.ICMClassificationToColorCodeString(request.getClassification().getClassification()));
try { TimeRange ConvertDiffRangeToRange = convertDiffRangeToRange(get.getExportDataRequestMsg().getRange()); org.miloss.fgsms.services.interfaces.reportingservice.ExportDataRequestMsg request = new org.miloss.fgsms.services.interfaces.reportingservice.ExportDataRequestMsg(); request.getURLs().addAll(get.getExportDataRequestMsg().getURLs()); request.setRange(ConvertDiffRangeToRange); request.setReportTypes(get.getExportDataRequestMsg().getReportTypes()); request.setClassification(get.getExportDataRequestMsg().getClassification());