class VersionEndpoint {
    @Autowired
    private VersionResource versionResource;

    @RequestMapping(path = "/update-async", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> updateAsync(@RequestBody String version) {
        return doUpdate(version, true);
    }

    @RequestMapping(path = "/update-sync", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> updateSync(@RequestBody String version) {
        return doUpdate(version, false);
    }

    @RequestMapping(path = "/clear-async", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> clearAsync(@RequestBody(required = false) String version) {
        return doClear(version, true);
    }

    @RequestMapping(path = "/clear-sync", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> clearSync(@RequestBody(required = false) String version) {
        return doClear(version, false);
    }

    @RequestMapping(path = "/view", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity<?> view() {
        return doView();
    }

    private ResponseEntity<?> doUpdate(String version, boolean async) {
        try {
            versionResource.update(version, async);

            return ResponseUtil.getSuccessResponse(true);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doClear(String version, boolean async) {
        try {
            versionResource.clear(version, async);

            return ResponseUtil.getSuccessResponse(true);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doView() {<FILL_FUNCTION_BODY>}
}

        try {
            List<String> versionList = versionResource.view();

            return ResponseUtil.getSuccessResponse(versionList);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    
<no_super_class>