@RequestMapping(value="/{dumpId}/events/store-success", method=RequestMethod.GET)
public String getStoreSuccessEvents(@PathVariable Long dumpId, Model model,
Locale locale, @RequestParam(defaultValue="1", required=false) Integer page) {
try {
Dump dump = this.serviceLocator.getDumpService().getDump(dumpId);
if(dump == null) {
model.addAttribute("message", "Dump with id " + dumpId + " doesn´t exist.");
return "common/error";
}
model.addAttribute("dump", dump);
PageManager<StoreSuccessEvent> paginator = new PageManager<StoreSuccessEvent>();
paginator.setOffset(this.getPageSize());
paginator.setUrlBase("/" + locale.getLanguage() + "/dump/" + dump.getId() +
"/events/store-success");
paginator.setStart((page-1)*paginator.getOffset());
paginator.setSize(this.serviceLocator.getEventService().countStoreSuccessEventsByDump(dump, locale));
paginator.setCollection(this.serviceLocator.getEventService().getStoreSuccessEventByDump(dump,
paginator.getStart(), paginator.getEnd(), null, locale));