An example {server}:{port}/exports/classificationreport_20120924.csv
So you can't exactly hardcode the URL as a property but will need to generate it dynamically whenever a request is made to that resource. I've already used joda-time in the past so I decided to use it again.
public String getClassificationReportURL() {
MutableDateTime now = new MutableDateTime();
now.setDayOfWeek(DateTimeConstants.MONDAY);
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyMMdd");
return getExportsBaseURL() + "classificationreport_" + fmt.print(now) + ".csv";
}
No comments:
Post a Comment