Class RemoteAPIAjaxController


  • @RestController
    @RequestMapping("/ajax/remote_api")
    public class RemoteAPIAjaxController
    extends BaseController
    Controller for asynchronous requests for remote api functionality.
    • Constructor Detail

    • Method Detail

      • getAjaxAPIList

        @RequestMapping(value="/list",
                        produces="application/json")
        public TableResponse<RemoteAPITableModel> getAjaxAPIList​(@RequestBody
                                                                 TableRequest tableRequest)
        Get a list of the current page for the Remote API Table
        Parameters:
        tableRequest - - the details for the current page of the Table
        Returns:
        TableResponse
      • checkAPIStatus

        @RequestMapping("/status/{apiId}")
        public org.springframework.http.ResponseEntity<java.util.Date> checkAPIStatus​(@PathVariable
                                                                                      java.lang.Long apiId)
        Check the currently logged in user's OAuth2 connection status to a given API
        Parameters:
        apiId - The ID of the api
        Returns:
        "valid" or "invalid_token" message
      • deleteRemoteAPI

        @PreAuthorize("hasRole(\'ROLE_ADMIN\')")
        @DeleteMapping("/{remoteId}/delete")
        public void deleteRemoteAPI​(@PathVariable
                                    long remoteId)
        Delete a Remote API Connection
        Parameters:
        remoteId - Identifier for a Remote API.
      • getListOfRemoteApis

        @GetMapping("/apis")
        public org.springframework.http.ResponseEntity<java.util.List<RemoteAPIModel>> getListOfRemoteApis()
        Get a list of all available remote API f
        Returns:
        List of RemoteAPIModel
      • getProjectsForAPI

        @GetMapping("/{remoteId}/projects")
        public org.springframework.http.ResponseEntity<java.util.List<RemoteProjectModel>> getProjectsForAPI​(@PathVariable
                                                                                                             long remoteId)
        Get a list of project available at a remote API
        Parameters:
        remoteId - identifier for a remote API
        Returns:
        list of project
      • createSynchronizedProject

        @PostMapping("/project")
        public org.springframework.http.ResponseEntity<AjaxResponse> createSynchronizedProject​(@RequestBody
                                                                                               CreateRemoteProjectRequest request)
        Create a new synchronized remote project
        Parameters:
        request - details about the remote project
        Returns:
        status of created the new remote project
      • postCreateRemoteAPI

        @PreAuthorize("hasRole(\'ROLE_ADMIN\')")
        @PostMapping("/create")
        public org.springframework.http.ResponseEntity<AjaxResponse> postCreateRemoteAPI​(RemoteAPI client,
                                                                                         java.util.Locale locale)
        Create a new client
        Parameters:
        client - The client to add
        locale - Locale of the current user session
        Returns:
        result of creating the remote api