Class APIController
- java.lang.Object
-
- eu.dnetlib.developers.controllers.APIController
-
@RestController @RequestMapping("/apis") @CrossOrigin(origins="*") public class APIController extends Object
-
-
Constructor Summary
Constructors Constructor Description APIController(APIService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<API>create(ServiceForm form)org.springframework.http.ResponseEntity<?>delete(Long id)org.springframework.http.ResponseEntity<List<API>>getAll()org.springframework.http.ResponseEntity<List<API>>getMyServices()org.springframework.http.ResponseEntity<List<API>>migrateAccessToken(List<RegisteredAT> registeredATS)org.springframework.http.ResponseEntity<API>update(Long id, ServiceForm form)
-
-
-
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)
-
-