Skip to content

Commit

Permalink
Use multi-argument constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettryan committed Mar 11, 2016
1 parent fe092d8 commit 83982a8
Showing 1 changed file with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,21 @@ public String doDefault() throws Exception {
return INPUT;
}

@Override
public String execute() throws Exception {
@Override
public String execute() throws Exception {
System.out.println("Saving settings: " + ageRuleEnabled);
PurgeAttachmentSettings s = new PurgeAttachmentSettings();
s.setAgeRuleEnabled(ageRuleEnabled);
s.setMaxDaysOld(maxDaysOld);
s.setMaxRevisions(maxRevisions);
s.setMaxSizeRuleEnabled(maxSizeRuleEnabled);
s.setMaxTotalSize(maxTotalSize);
s.setMode(mode);
s.setReportEmailAddress(reportEmailAddress);
s.setReportOnly(reportOnly);
s.setRevisionCountRuleEnabled(revisionCountRuleEnabled);
settingSvc.setSettings(getSpaceKey(), s);
return super.execute();
}
settingSvc.setSettings(getSpaceKey(),
new PurgeAttachmentSettings(mode,
ageRuleEnabled,
maxDaysOld,
revisionCountRuleEnabled,
maxRevisions,
maxSizeRuleEnabled,
maxTotalSize,
reportOnly,
reportEmailAddress));
return super.execute();
}

//
// Settings properties follow
Expand Down

0 comments on commit 83982a8

Please sign in to comment.