Package com.m4f.web.controller.exception

Examples of com.m4f.web.controller.exception.GenericException


      PageManager<Course> paginator = new PageManager<Course>();
      paginator.setOffset(this.getPageSize());
      paginator.setUrlBase("/" + locale.getLanguage()+ "/catalog/reglated/course/list");
      paginator.setSize(this.serviceLocator.getCourseService().countCourses(true, locale));
      if((page-1)*paginator.getOffset() > paginator.getSize()) {
        throw new GenericException("Paginator Out of Range!!! Size: " + paginator.getSize() + " start: " + (page-1)*paginator.getOffset());
      }
      paginator.setStart((page-1)*paginator.getOffset());
      paginator.setCollection(this.serviceLocator.getCourseService().getCourses(true,
          "-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd()));
      model.addAttribute("paginator", paginator);
      model.addAttribute("type", "reglated");
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "catalog.course.list";
  }
View Full Code Here


      PageManager<Course> paginator = new PageManager<Course>();
      paginator.setOffset(this.getPageSize());
      paginator.setUrlBase("/" + locale.getLanguage()+ "/catalog/non-reglated/course/list");
      paginator.setSize(this.serviceLocator.getCourseService().countCourses(false, locale));
      if((page-1)*paginator.getOffset() > paginator.getSize()) {
        throw new GenericException("Paginator Out of Range!!! Size: " + paginator.getSize() + " start: " + (page-1)*paginator.getOffset());
      }
      paginator.setStart((page-1)*paginator.getOffset());
      paginator.setCollection(this.serviceLocator.getCourseService().getCourses(false,
          "-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd()));
      model.addAttribute("paginator", paginator);
      model.addAttribute("type", "non-reglated");
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "catalog.course.list";
  }
View Full Code Here

      model.addAttribute("town", courseData.get("town"));
      model.addAttribute("tags", courseData.get("tags"));
     
      response.addDateHeader("Last-Modified", course.getStart() != null ? course.getStart().getTime() : course.getUpdated().getTime());
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "search.result.detail";
  }
View Full Code Here

           
      LOGGER.severe("Date: " + calendar.getTime());
     
      paginator.setSize(this.serviceLocator.getCourseService().countUpdatedCourses(calendar.getTime(), true));
      if((page-1)*paginator.getOffset() > paginator.getSize()) {
        throw new GenericException("Paginator Out of Range!!! Size: " + paginator.getSize() + " start: " + (page-1)*paginator.getOffset());
      }
      paginator.setStart((page-1)*paginator.getOffset());
      paginator.setCollection(this.serviceLocator.getCourseService().getUpdatedCourses(calendar.getTime(), true,
          "-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd()));
      /*paginator.setCollection(this.serviceLocator.getCourseService().getCourses(true,
          "-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd())); */
      model.addAttribute("paginator", paginator);
      model.addAttribute("type", "reglated");
     
      response.addDateHeader("Last-Modified", calendar.getTimeInMillis());
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "catalog.course.list";
  }
View Full Code Here

                 
      LOGGER.severe("Date: " + calendar.getTime());
     
      paginator.setSize(this.serviceLocator.getCourseService().countUpdatedCourses(calendar.getTime(), false));
      if((page-1)*paginator.getOffset() > paginator.getSize()) {
        throw new GenericException("Paginator Out of Range!!! Size: " + paginator.getSize() + " start: " + (page-1)*paginator.getOffset());
      }
      paginator.setStart((page-1)*paginator.getOffset());
      paginator.setCollection(this.serviceLocator.getCourseService().getUpdatedCourses(calendar.getTime(), false,
          "-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd()));
     
      model.addAttribute("paginator", paginator);
      model.addAttribute("type", "non-reglated");
     
      response.addDateHeader("Last-Modified", calendar.getTimeInMillis());
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "catalog.course.list";
  }
View Full Code Here

      model.addAttribute("town", courseData.get("town"));
      model.addAttribute("tags", courseData.get("tags"));
     
      response.addDateHeader("Last-Modified", course.getStart() != null ? course.getStart().getTime() : course.getUpdated().getTime());
    } catch(Exception e) {
      throw new GenericException(e);
    }
    return "search.result.detail";
  }
View Full Code Here

TOP

Related Classes of com.m4f.web.controller.exception.GenericException

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.