@RequestMapping(value = "/{collection}", method = RequestMethod.GET)
 @ResponseBody
 public Collection getItems(@PathVariable String collection) {
   RestfulModel model = m_loginService.getModel();
   return model.getTrollingObjects(collection);
   // return XMLCreator.marshal(model.getTrollingObjects(collection));
 }
 @RequestMapping(value = "/userinfo", method = RequestMethod.POST, headers = "Accept=text/xml")
 @ResponseBody
 public DOMSource setUser(@RequestBody User user) {
   RestfulModel model = m_loginService.getModel();
   model.setUser(user);
   return RestfulResponse.getResponse(RESPONSE_RESPONSE, "OK");
 }
 @RequestMapping(value = "/{doctype}", method = RequestMethod.PUT)
 @ResponseBody
 public DOMSource putItems(@RequestBody Collection content, @PathVariable String doctype) {
   RestfulModel model = m_loginService.getModel();
   RestfulResponse response = new RestfulResponse(RESPONSE_TRANSACTIONTICKET);
   content.setType(model.getType(doctype));
   response.setContent(model.setTrollingObjects(content).toString());
   return response.getBody();
 }
 @RequestMapping(value = "/views/{view}", method = RequestMethod.GET)
 @ResponseBody
 public DOMSource getView(@PathVariable String view) {
   RestfulModel model = m_loginService.getModel();
   TableView viewobject = model.getView(view);
   AnnotatedView annotated = new Adapter().decorate(viewobject);
   if (annotated == null) return XMLCreator.marshal(viewobject);
   else return XMLCreator.marshal(annotated);
 }
 @RequestMapping(value = "/{doctype}/{identifier}", method = RequestMethod.PUT)
 @ResponseBody
 public DOMSource putItem(
     @RequestBody Trollingobject object,
     @RequestParam Integer revision,
     @PathVariable String doctype,
     @PathVariable Integer identifier) {
   RestfulModel model = m_loginService.getModel();
   object.setObjectIdentifier(identifier.intValue());
   object.setCollection(model.getTrollingObjects(doctype));
   model.updateTrollingObject(object, revision.intValue());
   return RestfulResponse.getResponse(RESPONSE_RESPONSE, "OK");
 }
 @RequestMapping(value = "/userinfo", method = RequestMethod.GET)
 @ResponseBody
 public DOMSource userinfo() {
   RestfulModel model = m_loginService.getModel();
   return XMLCreator.marshal(model.getUser());
 }