Class CommandController


  • @Controller
    @Scope("session")
    @RequestMapping("api/command")
    @Transactional
    public class CommandController
    extends Object
    • Constructor Detail

      • CommandController

        public CommandController()
    • Method Detail

      • createRecord

        @RequestMapping(value="record",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public org.openforis.commons.web.Response createRecord​(@RequestBody
                                                               CreateRecordCommand command)
      • createRecordPreview

        @RequestMapping(value="record_preview",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public List<org.openforis.collect.web.controller.CommandController.RecordEventView> createRecordPreview​(@RequestBody
                                                                                                                CreateRecordPreviewCommand command)
                                                                                                         throws Exception
        Throws:
        Exception
      • deleteRecord

        @RequestMapping(value="record",
                        method=DELETE,
                        consumes="application/json")
        @ResponseBody
        public org.openforis.commons.web.Response deleteRecord​(@RequestBody
                                                               DeleteRecordCommand command)
      • addAttribute

        @RequestMapping(value="record/attribute/new",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public org.openforis.commons.web.Response addAttribute​(@RequestBody
                                                               AddAttributeCommand command)
      • addOrUpdateAttributes

        @RequestMapping(value="record/attributes",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public org.openforis.commons.web.Response addOrUpdateAttributes​(@RequestBody
                                                                        org.openforis.collect.web.controller.CommandController.UpdateAttributesCommandWrapper commandsWrapper)
      • updateAttribute

        @RequestMapping(value="record/attribute",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public Object updateAttribute​(@RequestBody
                                      org.openforis.collect.web.controller.CommandController.UpdateAttributeCommandWrapper commandWrapper)
      • updateAttributeFile

        @RequestMapping(value="record/attribute/file",
                        method=POST,
                        consumes="multipart/form-data")
        @ResponseBody
        public org.openforis.commons.web.Response updateAttributeFile​(@RequestParam("command")
                                                                      String commandWrapperJsonString,
                                                                      @RequestParam("file")
                                                                      org.springframework.web.multipart.MultipartFile multipartFile)
                                                               throws Exception
        Throws:
        Exception
      • deleteAttributeFile

        @RequestMapping(value="record/attribute/file/delete",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public Object deleteAttributeFile​(@RequestBody
                                          DeleteAttributeCommand command)
                                   throws Exception
        Throws:
        Exception
      • deleteAttribute

        @RequestMapping(value="record/attribute/delete",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public Object deleteAttribute​(@RequestBody
                                      DeleteAttributeCommand command)
      • addEntity

        @RequestMapping(value="record/entity",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public Object addEntity​(@RequestBody
                                AddEntityCommand command)
      • deleteEntity

        @RequestMapping(value="record/entity/delete",
                        method=POST,
                        consumes="application/json")
        @ResponseBody
        public Object deleteEntity​(@RequestBody
                                   DeleteEntityCommand command)