Class CommandController
java.lang.Object
org.openforis.collect.web.controller.CommandController
@Controller
@Scope("session")
@RequestMapping("api/command")
@Transactional
public class CommandController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openforis.commons.web.ResponseaddAttribute(AddAttributeCommand command) addEntity(AddEntityCommand command) org.openforis.commons.web.ResponseaddOrUpdateAttributes(org.openforis.collect.web.controller.CommandController.UpdateAttributesCommandWrapper commandsWrapper) org.openforis.commons.web.ResponsecreateRecord(CreateRecordCommand command) List<org.openforis.collect.web.controller.CommandController.RecordEventView> deleteAttribute(DeleteAttributeCommand command) deleteEntity(DeleteEntityCommand command) org.openforis.commons.web.ResponsedeleteRecord(DeleteRecordCommand command) updateAttribute(org.openforis.collect.web.controller.CommandController.UpdateAttributeCommandWrapper commandWrapper) org.openforis.commons.web.ResponseupdateAttributeFile(String commandWrapperJsonString, org.springframework.web.multipart.MultipartFile multipartFile)
-
Constructor Details
-
CommandController
public CommandController()
-
-
Method Details
-
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)
-