Examples of School


Examples of com.m4f.business.domain.School

   */
  @RequestMapping(value="/update/school", method=RequestMethod.GET)
  @ResponseStatus(HttpStatus.OK)
  public void updateManualSchoolInformation(@RequestParam(required=false) Long schoolId, Locale locale) throws Exception {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      if(school != null) {
        Map<String, String> params = new HashMap<String, String>();
        params.put("schoolId", String.valueOf(school.getId()));
       
        this.serviceLocator.getWorkerFactory().createWorker().addWork(
            this.serviceLocator.getAppConfigurationService().getGlobalConfiguration().SCHOOL_QUEUE,
            "/task/school/feed", params);
      } else {
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured("ROLE_AUTOMATIC_MEDIATOR")
  @RequestMapping(value="/edit/{schoolId}", method=RequestMethod.GET)
  public String getView(@PathVariable Long schoolId, Model model, @RequestHeader("referer") String referer,
      HttpSession session, Locale locale) {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      model.addAttribute("school", school);
      session.setAttribute(this.REFERER_PARAM, referer);
    } catch (Exception e) {
      return this.viewHelper.errorManagement(e);
    }
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured({"ROLE_AUTOMATIC_MEDIATOR","ROLE_ADMIN"})
  @RequestMapping(value="/detail/{schoolId}", method=RequestMethod.GET)
  public String getDetail(@PathVariable Long schoolId,
      Model model, Locale locale) {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      model.addAttribute("school", school);
    } catch (Exception e) {
      return this.viewHelper.errorManagement(e);
    }
    return "school.detail";
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured("ROLE_AUTOMATIC_MEDIATOR")
  @RequestMapping(value="/delete/{schoolId}", method=RequestMethod.GET)
  public String delete(@PathVariable Long schoolId, Model model, Locale locale,
      @RequestHeader("referer") String referer, @RequestHeader("Host") String host) {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      this.serviceLocator.getSchoolService().delete(school, locale);
    } catch (Exception e) {
      return this.viewHelper.errorManagement(e);
    }
    String returnURL = this.buildReturnURL(host, referer, locale);
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured({"ROLE_AUTOMATIC_MEDIATOR","ROLE_ADMIN"})
  @RequestMapping(value="/{schoolId}/courses", method=RequestMethod.GET)
  public String getCourses(@PathVariable Long schoolId,  Model model, Locale locale,
      @RequestParam(defaultValue="1", required=false) Integer page) {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      model.addAttribute("school", school);
      PageManager<Course> paginator = new PageManager<Course>();
      paginator.setOffset(this.getPageSize());
      paginator.setUrlBase("/" + locale.getLanguage()+ "/course/list");
      paginator.setStart((page-1)*paginator.getOffset());
 
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured({"ROLE_AUTOMATIC_MEDIATOR","ROLE_ADMIN"})
  @RequestMapping(value="/{schoolId}/dumps", method=RequestMethod.GET)
  public String getDumps(@PathVariable Long schoolId,  Model model, Locale locale,
      @RequestParam(defaultValue="1", required=false) Integer page) {
    try {
      School school = this.serviceLocator.getSchoolService().getSchool(schoolId, locale);
      if(school == null) {
        Exception e = new Exception("School with id " + schoolId + " doesn't exist.");
        return this.viewHelper.errorManagement(e);
      }
      model.addAttribute("school", school);
View Full Code Here

Examples of com.m4f.business.domain.School

   
    courseData = courses.get(courseId);
    if(courseData == null) {
      courseData = new HashMap<String, Object>();
      Course course = this.serviceLocator.getCourseService().getCourse(courseId, locale);
      School school = this.serviceLocator.getSchoolService().getSchool(course.getSchool(), locale);
      Provider provider = this.serviceLocator.getProviderService().getProviderById(school.getProvider(), locale);
     
      String townName = school.getContactInfo() != null &&
          school.getContactInfo().getCity() != null ?
          school.getContactInfo().getCity() : "";
     

      //Town town = this.getTownByName(townName, locale);

      Town town = this.serviceLocator.getTerritorialService().getTownsMap(locale).get(townName);
View Full Code Here

Examples of com.m4f.business.domain.School

 
  @Override
  public void buildSeoEntity(Course course, Locale locale)
    throws ServiceNotFoundException, ContextNotActiveException, Exception {
   
    School school = this.serviceLocator.getSchoolService().getSchool(course.getSchool(), locale);
    Provider provider = this.serviceLocator.getProviderService().getProviderById(course.getProvider(), locale);
   
    // Territorial data
    String townName = school.getContactInfo() != null &&
      school.getContactInfo().getCity() != null ?
      school.getContactInfo().getCity() : "";
   
    List<Town> towns = this.serviceLocator.getTerritorialService().
      findTownsByName(townName, locale);
   
    Town town = new Town();
View Full Code Here

Examples of com.m4f.business.domain.School

  @Secured({"ROLE_AUTOMATIC_MEDIATOR","ROLE_ADMIN"})
  @RequestMapping(value="/detail/{courseId}", method=RequestMethod.GET)
  public String detail(@PathVariable Long courseId, Model model, Locale locale) {
    try {
      Course course = this.serviceLocator.getCourseService().getCourse(courseId, locale);
      School school = this.serviceLocator.getSchoolService().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

Examples of com.m4f.business.domain.School

   
    @Override
    public void startElement(String uri, String localName, String qName,
        Attributes attributes) throws SAXException {
      if(SCHOOL.equals(qName)) {
        this.school = new School();
        this.info = new ContactInfo();
        this.school.setProvider(provider.getId());
      }
      this.sb.delete(0, this.sb.length());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.