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 Modifier and Type Class Description static classDataRestoreController.RemoteDataRestoreResponse
-
Constructor Summary
Constructors Constructor Description DataRestoreController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataRestoreController.RemoteDataRestoreResponseabortRestoreDataRemotelyJob(String jobId)DataRestoreController.RemoteDataRestoreResponsegetRestoreDataRemotelyStatus(String jobId)org.openforis.commons.web.JobStatusResponserestoreData(org.springframework.web.multipart.MultipartFile multipartFile, String surveyName, boolean validateRecords, boolean deleteAllRecordsBeforeImport, String recordOverwriteStrategy)DataRestoreController.RemoteDataRestoreResponserestoreDataRemotely(UploadItem uploadItem, String surveyName, String restoreKey)-
Methods inherited from class org.openforis.collect.web.controller.BasicController
generateFormValidationResponse, getSessionState
-
-
-
-
Method Detail
-
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
-
-