Add support for Freemind to Wise transformation:
curl http://localhost:8080/service/transform.wise --data @fonts.mm -H "Content-Type:application/freemind" --post301
This commit is contained in:
@@ -81,6 +81,18 @@ public class TransformerController extends BaseController {
|
||||
return new ModelAndView("transformViewFreemind", values);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"application/wisemapping+xml"}, consumes = {"application/freemind"})
|
||||
@ResponseBody
|
||||
public ModelAndView transformWisemapping(@RequestBody @Nullable final String content) throws IOException {
|
||||
final Map<String, Object> values = new HashMap<String, Object>();
|
||||
if (content == null || content.length() == 0) {
|
||||
throw new IllegalArgumentException("Body can not be null.");
|
||||
}
|
||||
values.put("content", content);
|
||||
return new ModelAndView("transformViewWise", values);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/transform", consumes = {"application/x-www-form-urlencoded"})
|
||||
public ModelAndView transform(@NotNull HttpServletRequest request,
|
||||
@NotNull HttpServletResponse response) throws IOException {
|
||||
|
Reference in New Issue
Block a user