Class APIController


  • @RestController
    @RequestMapping("/apis")
    @CrossOrigin(origins="*")
    public class APIController
    extends Object
    • Constructor Detail

      • APIController

        @Autowired
        public APIController​(APIService service)
    • Method Detail

      • getAll

        @PreAuthorize("hasAnyAuthority(\'PORTAL_ADMINISTRATOR\')")
        @RequestMapping(value="/all",
                        method=GET)
        public org.springframework.http.ResponseEntity<List<API>> getAll()
      • migrateAccessToken

        @PreAuthorize("hasAnyAuthority(\'PORTAL_ADMINISTRATOR\')")
        @RequestMapping(value="/migrate/accessToken",
                        method=POST)
        public org.springframework.http.ResponseEntity<List<API>> migrateAccessToken​(@RequestBody
                                                                                     List<RegisteredAT> registeredATS)
      • getMyServices

        @PreAuthorize("hasAnyAuthority(\'REGISTERED_USER\') && @AuthorizationService.hasPersonalInfo()")
        @RequestMapping(value="/my-services",
                        method=GET)
        public org.springframework.http.ResponseEntity<List<API>> getMyServices()
      • create

        @PreAuthorize("hasAnyAuthority(\'REGISTERED_USER\') && @AuthorizationService.hasPersonalInfo()")
        @RequestMapping(value="/save/new",
                        method=POST)
        public org.springframework.http.ResponseEntity<API> create​(@RequestBody
                                                                   ServiceForm form)
      • update

        @PreAuthorize("hasAnyAuthority(\'REGISTERED_USER\') && @AuthorizationService.hasPersonalInfo() && @AuthorizationService.isMyService(#id)")
        @RequestMapping(value="/save/{id}",
                        method=POST)
        public org.springframework.http.ResponseEntity<API> update​(@PathVariable
                                                                   Long id,
                                                                   @RequestBody
                                                                   ServiceForm form)
      • delete

        @PreAuthorize("hasAnyAuthority(\'REGISTERED_USER\') && @AuthorizationService.hasPersonalInfo() && @AuthorizationService.isMyService(#id)")
        @RequestMapping(value="/delete/{id}",
                        method=DELETE)
        public org.springframework.http.ResponseEntity<?> delete​(@PathVariable
                                                                 Long id)