Package com.m4f.utils.feeds.events.model

Examples of com.m4f.utils.feeds.events.model.Dump


 
  @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));
View Full Code Here


  }
 
  @RequestMapping(value="/events/success/delete/all/{dumpId}", method=RequestMethod.GET)
  public String deleteAllSuccessEvents(@PathVariable Long dumpId,
      Model model, Locale locale) {
    Dump dump = null;
    try {
      dump = this.serviceLocator.getDumpService().getDump(dumpId);
      if(dump == null) {
        model.addAttribute("message", "Dump with id " + dumpId + " doesn´t exist.");
        return "common/error";
      }
      this.serviceLocator.getEventService().deleteStoreSuccessEventsByDump(dump);
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      model.addAttribute("message", "Exception produced ...");
      return "common.error";
    }
    return "redirect:/" + locale.getLanguage() + "/dump/events/success/list/" + dump.getId();
  }
View Full Code Here

TOP

Related Classes of com.m4f.utils.feeds.events.model.Dump

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.