Revision 139904ca
Added by Andreas Kohlbecker about 8 years ago
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionElementController.java | ||
---|---|---|
110 | 110 |
} |
111 | 111 |
|
112 | 112 |
|
113 |
@RequestMapping(method = RequestMethod.GET) // mapped as absolute path, see CdmAntPathMatcher |
|
114 |
public ModelAndView doGetDescriptionElement( |
|
115 |
@PathVariable("uuid") UUID uuid, |
|
116 |
HttpServletRequest request, |
|
117 |
HttpServletResponse response) throws IOException { |
|
118 |
|
|
119 |
ModelAndView mv = new ModelAndView(); |
|
120 |
logger.info("doGetDescriptionElement() - " + request.getRequestURI()); |
|
121 |
DescriptionElementBase element = service.loadDescriptionElement(uuid, getInitializationStrategy()); |
|
122 |
if(element == null) { |
|
123 |
HttpStatusMessage.UUID_NOT_FOUND.send(response); |
|
124 |
} |
|
125 |
mv.addObject(element); |
|
126 |
return mv; |
|
127 |
} |
|
113 |
// @RequestMapping(method = RequestMethod.GET) // mapped as absolute path, see CdmAntPathMatcher
|
|
114 |
// public ModelAndView doGetDescriptionElement(
|
|
115 |
// @PathVariable("uuid") UUID uuid,
|
|
116 |
// HttpServletRequest request,
|
|
117 |
// HttpServletResponse response) throws IOException {
|
|
118 |
// |
|
119 |
// ModelAndView mv = new ModelAndView();
|
|
120 |
// logger.info("doGetDescriptionElement() - " + request.getRequestURI());
|
|
121 |
// DescriptionElementBase element = service.loadDescriptionElement(uuid, getInitializationStrategy());
|
|
122 |
// if(element == null) {
|
|
123 |
// HttpStatusMessage.UUID_NOT_FOUND.send(response);
|
|
124 |
// }
|
|
125 |
// mv.addObject(element);
|
|
126 |
// return mv;
|
|
127 |
// }
|
|
128 | 128 |
|
129 | 129 |
@RequestMapping(value = "annotations", method = RequestMethod.GET) // mapped as absolute path, see CdmAntPathMatcher |
130 | 130 |
public Pager<Annotation> doGetDescriptionElementAnnotations( |
131 |
@PathVariable("descriptionelement_uuid") UUID uuid,
|
|
131 |
@PathVariable("uuid") UUID uuid, |
|
132 | 132 |
HttpServletRequest request, |
133 | 133 |
HttpServletResponse response) throws IOException { |
134 | 134 |
logger.info("doGetDescriptionElementAnnotations() - " + request.getRequestURI()); |
... | ... | |
145 | 145 |
|
146 | 146 |
@RequestMapping(value = "states", method = RequestMethod.GET) // mapped as absolute path, see CdmAntPathMatcher |
147 | 147 |
public ModelAndView doGetDescriptionElementStates( |
148 |
@PathVariable("descriptionelement_uuid") UUID uuid,
|
|
148 |
@PathVariable("uuid") UUID uuid, |
|
149 | 149 |
HttpServletRequest request, |
150 | 150 |
HttpServletResponse response) throws IOException { |
151 | 151 |
logger.info("doGetDescriptionElementStates() - " + request.getRequestURI()); |
Also available in: Unified diff
solving more problems which stem from previous refactoring