Class DataRestoreController
java.lang.Object
org.openforis.collect.web.controller.BasicController
org.openforis.collect.web.controller.DataRestoreController
@Controller
@RequestMapping("api")
@Scope("session")
public class DataRestoreController
extends BasicController
- Author:
- S. Ricci
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openforis.commons.web.JobStatusResponserestoreData(org.springframework.web.multipart.MultipartFile multipartFile, String surveyName, boolean validateRecords, boolean deleteAllRecordsBeforeImport, String recordOverwriteStrategy) restoreDataRemotely(UploadItem uploadItem, String surveyName, String restoreKey) Methods inherited from class org.openforis.collect.web.controller.BasicController
generateFormValidationResponse, getSessionState
-
Constructor Details
-
DataRestoreController
public DataRestoreController()
-
-
Method Details
-
restoreData
@Secured("ROLE_ENTRY") @RequestMapping(value="/surveys/restore/data", method=POST, consumes="multipart/form-data") @ResponseBody public org.openforis.commons.web.JobStatusResponse restoreData(@RequestParam("file") org.springframework.web.multipart.MultipartFile multipartFile, @RequestParam(required=false) String surveyName, @RequestParam(required=false,defaultValue="true") boolean validateRecords, @RequestParam(required=false,defaultValue="false") boolean deleteAllRecordsBeforeImport, @RequestParam(required=false,defaultValue="OVERWRITE_OLDER") String recordOverwriteStrategy) throws IOException - Throws:
IOException
-
restoreDataRemotely
@RequestMapping(value="/surveys/{surveyName}/data/restoreremotely.json", method=POST) @ResponseBody public DataRestoreController.RemoteDataRestoreResponse restoreDataRemotely(UploadItem uploadItem, @PathVariable String surveyName, @RequestParam String restoreKey) -
getRestoreDataRemotelyStatus
@Secured("ROLE_ENTRY") @RequestMapping(value="/surveys/data/restorejobs/{jobId}/status.json", method=GET) @ResponseBody public DataRestoreController.RemoteDataRestoreResponse getRestoreDataRemotelyStatus(@PathVariable String jobId) throws IOException - Throws:
IOException
-
abortRestoreDataRemotelyJob
@RequestMapping(value="/surveys/data/restore/jobs/{jobId}/abort.json", method=GET) @ResponseBody public DataRestoreController.RemoteDataRestoreResponse abortRestoreDataRemotelyJob(@PathVariable String jobId) throws IOException - Throws:
IOException
-