Skip to content

Add app id export #548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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