Class SnapshotController


  • @Controller
    public class SnapshotController
    extends Object
    Author:
    Daniel Bernstein Date: Jan 27,2014
    • Field Detail

      • log

        protected final org.slf4j.Logger log
    • Method Detail

      • 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

        protected String getUserEmail​(String username)
      • getUsername

        protected String getUsername​(javax.servlet.http.HttpServletRequest request)
      • get

        @RequestMapping(value="/spaces/snapshot",
                        method=GET)
        public org.springframework.web.servlet.ModelAndView get​(@RequestParam
                                                                String storeId,
                                                                @RequestParam
                                                                String spaceId)
      • getSnapshotList

        @RequestMapping(value="/spaces/snapshots/{storeId}",
                        method=GET)
        @ResponseBody
        public String getSnapshotList​(@PathVariable("storeId")
                                      String storeId)
      • getSnapshotTotals

        @RequestMapping(value="/spaces/snapshots/totals/{storeId}",
                        method=GET)
        @ResponseBody
        public String getSnapshotTotals​(@PathVariable("storeId")
                                        String storeId,
                                        @RequestParam(value="status",required=false)
                                        String status)
      • 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)
      • 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:
        ParseException
        Exception
      • getRestore

        @RequestMapping(value="/spaces/restores/{storeId}/by-snapshot/{snapshotId:.+}",
                        method=GET)
        @ResponseBody
        public String getRestore​(@PathVariable("storeId")
                                 String storeId,
                                 @PathVariable("snapshotId")
                                 String snapshotId)
      • getRestoreByRestoreId

        @RequestMapping(value="/spaces/restores/{storeId}/{restoreId:.+}",
                        method=GET)
        @ResponseBody
        public String getRestoreByRestoreId​(@PathVariable("storeId")
                                            String storeId,
                                            @PathVariable("restoreId")
                                            String restoreId)
      • 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