Package com.asual.summer.sample.domain

Examples of com.asual.summer.sample.domain.Technology


  }
 
  @RequestMapping(value="/{value}", method=RequestMethod.GET)
  @ResponseViews({JsonView.class, XmlView.class})
  public ModelAndView view(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology == null) {
      throw new ViewNotFoundException();
    }
    return new ModelAndView("/view", new ModelMap(technology));
  }
View Full Code Here


    return new ModelAndView(new RedirectView("/technology/" + technology.getValue(), true));
  }
 
  @RequestMapping(value="/{value}", method=RequestMethod.DELETE)
  public ModelAndView remove(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology != null) {
      technology.remove();
    }
    return new ModelAndView(new RedirectView("/technology", true));
  }
View Full Code Here

  }
 
  @RequestMapping("/add")
  public ModelAndView add() {
    ModelMap model = new ModelMap();
    model.addAllAttributes(Arrays.asList(new Technology(), License.list(), Status.list()));
    return new ModelAndView("/add", model);
  }
View Full Code Here

    return new ModelAndView("/add", model);
  }
 
  @RequestMapping("/{value}/edit")
  public ModelAndView edit(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology == null) {
      throw new ViewNotFoundException();
    }
    ModelMap model = new ModelMap();
    model.addAllAttributes(Arrays.asList(technology, License.list(), Status.list()));
View Full Code Here

  }
 
  @RequestMapping(value="/{value}", method=RequestMethod.GET)
  @ResponseViews({JsonView.class,XmlView.class})
  public ModelAndView view(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology == null) {
      throw new ViewNotFoundException();
    }
    return new ModelAndView("/view", new ModelMap(technology));
  }
View Full Code Here

    return new ModelAndView(new RedirectView("/technology/" + technology.getValue(), true));
  }
 
  @RequestMapping(value="/{value}", method=RequestMethod.DELETE)
  public ModelAndView remove(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology != null) {
      technology.remove();
    }
    return new ModelAndView(new RedirectView("/technology", true));
  }
View Full Code Here

  }
 
  @RequestMapping("/add")
  public ModelAndView add() {
    ModelMap model = new ModelMap();
    model.addAllAttributes(Arrays.asList(new Technology(), License.list(), Status.list()));
    return new ModelAndView("/add", model);
  }
View Full Code Here

    return new ModelAndView("/add", model);
  }
 
  @RequestMapping("/{value}/edit")
  public ModelAndView edit(@PathVariable("value") String value) {
    Technology technology = Technology.find(value);
    if (technology == null) {
      throw new ViewNotFoundException();
    }
    ModelMap model = new ModelMap();
    model.addAllAttributes(Arrays.asList(technology, License.list(), Status.list()));
View Full Code Here

TOP

Related Classes of com.asual.summer.sample.domain.Technology

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.