Package com.m4f.business.domain.extended

Examples of com.m4f.business.domain.extended.ExtendedSchool


  @RequestMapping(value="/{schoolId}/courses", method=RequestMethod.GET)
  public String getCourses(@PathVariable Long schoolId,  Model model, Locale locale,
      @RequestParam(defaultValue="1", required=false) Integer page,@RequestParam(defaultValue="", required=false) String order) {
    try {
      String ordering = order != null && !("").equals(order) ? order : "title";
      ExtendedSchool school = this.serviceLocator.getExtendedSchoolService().getSchool(schoolId, locale);
      Collection<ExtendedCourse> courses = this.serviceLocator.getExtendedCourseService().getCoursesBySchool(school.getId(), "title", locale);   
      model.addAttribute("school", school);
      model.addAttribute("courses", courses);   
      PageManager<ExtendedCourse> paginator = new PageManager<ExtendedCourse>();
      paginator.setOffset(this.getPageSize());
      paginator.setUrlBase("/" + locale.getLanguage()+ "/extended/school/" +
View Full Code Here


  @Secured({"ROLE_MANUAL_MEDIATOR","ROLE_ADMIN"})
  @RequestMapping(value="/detail/{courseId}", method=RequestMethod.GET)
  public String detail(@PathVariable Long courseId, Model model, Locale locale) {
    try {
      ExtendedCourse course = this.serviceLocator.getExtendedCourseService().getCourse(courseId, locale);
      ExtendedSchool school = this.serviceLocator.getExtendedSchoolService().getSchool(course.getSchool(), locale);
      model.addAttribute("course", course);
      model.addAttribute("school", school);
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      return "common.error";
View Full Code Here

      @RequestParam(required=true, defaultValue="") Long schoolId, Locale locale) {
    try {
      return this.serviceLocator.getExtendedSchoolService().getSchool(schoolId, locale);
    } catch (Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      return new ExtendedSchool();
    }
  }
View Full Code Here

   * Public detail methods
   */
  @RequestMapping(value="/public/school/{schoolId}", method=RequestMethod.GET)
  public String showSchoolDetail(@PathVariable Long schoolId, Locale locale, Model model) {
    try {
      ExtendedSchool school = this.serviceLocator.getExtendedSchoolService().getSchool(schoolId, locale);
      model.addAttribute("school", school);
    } catch(Exception e) {
      LOGGER.log(Level.SEVERE, StackTraceUtil.getStackTrace(e));
      return "common.error";
    }
View Full Code Here

 
  @RequestMapping(value="/public/course/{courseId}", method=RequestMethod.GET)
  public String showCourseDetail(@PathVariable Long courseId, Locale locale, Model model) {
    try {
      ExtendedCourse course = this.serviceLocator.getExtendedCourseService().getCourse(courseId, locale);
      ExtendedSchool school = this.serviceLocator.getExtendedSchoolService().getSchool(course.getSchool(), locale);
      Town town = this.serviceLocator.getTerritorialService().getTown(school.getTown(), locale);
      model.addAttribute("course", course);
      model.addAttribute("school", school);
      model.addAttribute("town", town);
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
View Full Code Here

TOP

Related Classes of com.m4f.business.domain.extended.ExtendedSchool

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.