Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private enum HeaderFields {
"Application Name",
"Application ID",
"Application Organization",
"Application Created On",
CREATED_ON
});

Expand Down Expand Up @@ -192,7 +193,7 @@ private void writeStandardToCSV(CSVPrinter csvPrinter, API api) throws IOExcepti
api.getName(),
api.getPath(),
api.getVersion(),
getFormattedDate(api)
getFormattedDate(api.getCreatedOn())
);
}

Expand All @@ -210,7 +211,7 @@ private void writeWideToCSV(CSVPrinter csvPrinter, API api) throws IOException {
getUsedPolicies(api, PolicyType.ROUTING).toString().replace("[", "").replace("]", ""),
getUsedPolicies(api, PolicyType.RESPONSE).toString().replace("[", "").replace("]", ""),
getUsedPolicies(api, PolicyType.FAULT_HANDLER).toString().replace("[", "").replace("]", ""),
getFormattedDate(api)
getFormattedDate(api.getCreatedOn())
);
}

Expand All @@ -235,13 +236,14 @@ private void writeAPIUltraToCSV(CSVPrinter csvPrinter, API api, ClientApplicatio
app.getName(),
app.getId(),
app.getOrganization().getName(),
getFormattedDate(api)
getFormattedDate(app.getCreatedOn()),
getFormattedDate(api.getCreatedOn())
);
}

private String getFormattedDate(API api) {
if (api.getCreatedOn() == null) return "N/A";
return isoDateFormatter.format(api.getCreatedOn());
private String getFormattedDate(Long longDate) {
if (longDate == null) return "N/A";
return isoDateFormatter.format(longDate);
}

@Override
Expand Down
Loading