@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) |
org.springframework.web.servlet.ModelAndView |
getHistory(String storeId,
String snapshotId,
Integer page,
Boolean attachment,
javax.servlet.http.HttpServletResponse response) |
String |
getRestore(String storeId,
String snapshotId) |
String |
getRestoreByRestoreId(String storeId,
String restoreId) |
String |
getSnapshot(String storeId,
String snapshotId) |
protected GetSnapshotHistoryTaskResult |
getSnapshotHistory(String snapshotId,
Integer page,
SnapshotTaskClient taskClient,
int pageSize) |
String |
getSnapshotList(String storeId) |
protected SnapshotTaskClient |
getTaskClient(String storeId) |
protected String |
getUserEmail(String username) |
protected String |
getUsername(javax.servlet.http.HttpServletRequest request) |
String |
requestRestore(javax.servlet.http.HttpServletRequest request,
String storeId,
String snapshotId) |
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,
@Qualifier(value="userDetailsSvc")
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
Exceptionprotected 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}/history",
method=GET)
public org.springframework.web.servlet.ModelAndView getHistory(@PathVariable(value="storeId")
String storeId,
@PathVariable(value="snapshotId")
String snapshotId,
@RequestParam(value="page",required=false)
Integer page,
@RequestParam(value="attachment",required=false,defaultValue="false")
Boolean attachment,
javax.servlet.http.HttpServletResponse response)
protected GetSnapshotHistoryTaskResult getSnapshotHistory(String snapshotId, Integer page, SnapshotTaskClient taskClient, int pageSize) throws ContentStoreException
ContentStoreException@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 - ParseExceptionExceptionprotected 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)
@RequestMapping(value="/spaces/restores",
method=POST)
@ResponseBody
public String restore(javax.servlet.http.HttpServletRequest request,
@RequestParam
String storeId,
@RequestParam
String snapshotId)
throws Exception
ExceptionCopyright © 2009–2020 LYRASIS. All rights reserved.