@Controller public class SnapshotController extends Object
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
SnapshotController(ContentStoreManager contentStoreManager,
DuracloudUserDetailsService userDetailsService,
SnapshotTaskClientManager snapshotTaskClientManager) |
Modifier and Type | Method and Description |
---|---|
String |
create(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String spaceId,
String storeId,
String description) |
org.springframework.web.servlet.ModelAndView |
get(String storeId,
String spaceId) |
org.springframework.web.servlet.ModelAndView |
getContent(String storeId,
String snapshotId,
Integer page,
String prefix) |
String |
getRestore(String storeId,
String snapshotId) |
String |
getRestoreByRestoreId(String storeId,
String restoreId) |
String |
getSnapshot(String storeId,
String snapshotId) |
String |
getSnapshotList(String storeId) |
protected SnapshotTaskClient |
getTaskClient(String storeId) |
protected String |
getUserEmail(String username) |
protected String |
getUsername(javax.servlet.http.HttpServletRequest request) |
String |
restore(javax.servlet.http.HttpServletRequest request,
String storeId,
String snapshotId) |
String |
restoreSpaceId(javax.servlet.http.HttpServletRequest request,
String storeId,
String snapshotId)
Returns the name of the restore space, if it exists, associated with a snapshot
|
@Autowired(required=true) public SnapshotController(@Qualifier(value="contentStoreManager") ContentStoreManager contentStoreManager, DuracloudUserDetailsService userDetailsService, SnapshotTaskClientManager snapshotTaskClientManager)
@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
Exception
protected String getUsername(javax.servlet.http.HttpServletRequest request)
@RequestMapping(value="/spaces/snapshot", method=GET) public org.springframework.web.servlet.ModelAndView get(@RequestParam String storeId, @RequestParam String spaceId)
@RequestMapping(value="/spaces/snapshots/{storeId}", method=GET) @ResponseBody public String getSnapshotList(@PathVariable(value="storeId") String storeId)
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId:.+}", method=GET) @ResponseBody public String getSnapshot(@PathVariable(value="storeId") String storeId, @PathVariable(value="snapshotId") String snapshotId) throws Exception
Exception
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId}/content", method=GET) public org.springframework.web.servlet.ModelAndView getContent(@PathVariable(value="storeId") String storeId, @PathVariable(value="snapshotId") String snapshotId, @RequestParam(value="page",required=false) Integer page, @RequestParam(value="prefix",required=false) String prefix)
@RequestMapping(value="/spaces/snapshots/{storeId}/{snapshotId}/restore-space-id", method=GET) @ResponseBody public String restoreSpaceId(javax.servlet.http.HttpServletRequest request, @PathVariable(value="storeId") String storeId, @PathVariable(value="snapshotId") String snapshotId) throws Exception
request
- snapshotId
- ParseException
Exception
protected SnapshotTaskClient getTaskClient(String storeId) throws ContentStoreException
ContentStoreException
@RequestMapping(value="/spaces/restores/{storeId}/by-snapshot/{snapshotId:.+}", method=GET) @ResponseBody public String getRestore(@PathVariable(value="storeId") String storeId, @PathVariable(value="snapshotId") String snapshotId)
@RequestMapping(value="/spaces/restores/{storeId}/{restoreId:.+}", method=GET) @ResponseBody public String getRestoreByRestoreId(@PathVariable(value="storeId") String storeId, @PathVariable(value="restoreId") String restoreId)
Copyright © 2009–2014 DuraSpace. All rights reserved.