Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[Bug 1402333] - Include the resource column in the exported Alert Def…
Browse files Browse the repository at this point in the history
…initions report.
  • Loading branch information
rubenvp8510 committed Aug 2, 2017
1 parent 4047e78 commit c9305ca
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -76,7 +76,7 @@ public PageList<AlertDefinition> execute(AlertDefinitionCriteria criteria) {

CsvWriter<AlertDefinition> csvWriter = new CsvWriter<AlertDefinition>();
csvWriter.setColumns("name", "description", "enabled", "priority", "parent", "ancestry",
"detailsURL");
"detailsURL", "resource");

csvWriter.setPropertyConverter("parent", new PropertyConverter<AlertDefinition>() {
@Override
Expand All @@ -85,6 +85,13 @@ public Object convert(AlertDefinition alertDef, String propertyName) {
}
});

csvWriter.setPropertyConverter("resource", new PropertyConverter<AlertDefinition>() {
@Override
public Object convert(AlertDefinition alertDef, String propertyName) {
return alertDef.getResource().getName();
}
});

csvWriter.setPropertyConverter("ancestry", new PropertyConverter<AlertDefinition>() {
@Override
public Object convert(AlertDefinition alertDef, String propertyName) {
Expand Down Expand Up @@ -122,7 +129,7 @@ private String getParentURL(AlertDefinition alertDef) {


private String getHeader(){
return "Name,Description,Enabled,Priority,Parent,Ancestry,Details URL";
return "Name,Description,Enabled,Priority,Parent,Ancestry,Details URL,Resource";
}

private String getDetailsURL(AlertDefinition alertDef) {
Expand Down

0 comments on commit c9305ca

Please sign in to comment.