Class SnapshotController
java.lang.Object
org.duracloud.duradmin.spaces.controller.SnapshotController
- Author:
- Daniel Bernstein Date: Jan 27,2014
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotController(ContentStoreManager contentStoreManager, DuracloudUserDetailsService userDetailsService, SnapshotTaskClientManager snapshotTaskClientManager) -
Method Summary
Modifier and TypeMethodDescriptioncreate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String spaceId, String storeId, String description) org.springframework.web.servlet.ModelAndVieworg.springframework.web.servlet.ModelAndViewgetContent(String storeId, String snapshotId, Integer page, String prefix) org.springframework.web.servlet.ModelAndViewgetHistory(String storeId, String snapshotId, Integer page, Boolean attachment, javax.servlet.http.HttpServletResponse response) getRestore(String storeId, String snapshotId) getRestoreByRestoreId(String storeId, String restoreId) getSnapshot(String storeId, String snapshotId) protected GetSnapshotHistoryTaskResultgetSnapshotHistory(String snapshotId, Integer page, SnapshotTaskClient taskClient, int pageSize) getSnapshotList(String storeId) getSnapshotTotals(String storeId, String status) protected SnapshotTaskClientgetTaskClient(String storeId) protected StringgetUserEmail(String username) protected StringgetUsername(javax.servlet.http.HttpServletRequest request) requestRestore(javax.servlet.http.HttpServletRequest request, String storeId, String snapshotId) restoreSpaceId(javax.servlet.http.HttpServletRequest request, String storeId, String snapshotId) Returns the name of the restore space, if it exists, associated with a snapshot
-
Field Details
-
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
SnapshotController
@Autowired(required=true) public SnapshotController(@Qualifier("contentStoreManager") ContentStoreManager contentStoreManager, @Qualifier("userDetailsSvc") DuracloudUserDetailsService userDetailsService, SnapshotTaskClientManager snapshotTaskClientManager)
-
-
Method Details
-
create
@RequestMapping(value="/spaces/snapshot", method=POST) @ResponseBody public String create(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam String spaceId, @RequestParam String storeId, @RequestParam String description) throws Exception - Throws:
Exception
-
getUserEmail
-
getUsername
-
get
-
getSnapshotList
-
getSnapshotTotals
-
getSnapshot
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId:.+}", method=GET) @ResponseBody public String getSnapshot(@PathVariable("storeId") String storeId, @PathVariable("snapshotId") String snapshotId) throws Exception - Throws:
Exception
-
getHistory
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId}/history", method=GET) public org.springframework.web.servlet.ModelAndView getHistory(@PathVariable("storeId") String storeId, @PathVariable("snapshotId") String snapshotId, @RequestParam(value="page",required=false) Integer page, @RequestParam(value="attachment",required=false,defaultValue="false") Boolean attachment, javax.servlet.http.HttpServletResponse response) -
getSnapshotHistory
protected GetSnapshotHistoryTaskResult getSnapshotHistory(String snapshotId, Integer page, SnapshotTaskClient taskClient, int pageSize) throws ContentStoreException - Throws:
ContentStoreException
-
getContent
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId}/content", method=GET) public org.springframework.web.servlet.ModelAndView getContent(@PathVariable("storeId") String storeId, @PathVariable("snapshotId") String snapshotId, @RequestParam(value="page",required=false) Integer page, @RequestParam(value="prefix",required=false) String prefix) -
restoreSpaceId
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId}/restore-space-id", method=GET) @ResponseBody public String restoreSpaceId(javax.servlet.http.HttpServletRequest request, @PathVariable("storeId") String storeId, @PathVariable("snapshotId") String snapshotId) throws Exception Returns the name of the restore space, if it exists, associated with a snapshot- Parameters:
request-snapshotId-- Returns:
- Throws:
ParseExceptionException
-
getTaskClient
- Throws:
ContentStoreException
-
getRestore
-
getRestoreByRestoreId
-
restore
@RequestMapping(value="/spaces/restores", method=POST) @ResponseBody public String restore(javax.servlet.http.HttpServletRequest request, @RequestParam String storeId, @RequestParam String snapshotId) throws Exception - Throws:
Exception
-
requestRestore
@RequestMapping(value="/spaces/restores/request", method=POST) @ResponseBody public String requestRestore(javax.servlet.http.HttpServletRequest request, @RequestParam String storeId, @RequestParam String snapshotId) throws Exception - Throws:
Exception
-