Skip to content

Commit

Permalink
groovified example code
Browse files Browse the repository at this point in the history
  • Loading branch information
ncautotest authored Oct 24, 2023
1 parent f43e38e commit 615e260
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,11 @@ aecu.contentUpgradeBuilder()
.forDescendantResourcesOf("/content/we-retail/ca/en", false)
.filterWith(new FilterBy(){
public boolean filter(Resource resource, StringBuilder output) {
ValueMap properties = resource.getValueMap();
Calendar lastModified = properties.get("cq:lastModified", Calendar.class);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.YEAR, -5);
return (lastModified.getTime().before(cal.getTime()));
ValueMap properties = resource.valueMap
Calendar lastModified = properties.get("cq:lastModified", Calendar.class)
Calendar cal = Calendar.instance
cal.add(Calendar.YEAR, -5)
return lastModified.time.before(cal.time)
}
})
.doSetProperty("old", true) // mark pages that weren't modified in the past 5 years
Expand Down

0 comments on commit 615e260

Please sign in to comment.