Class ProjectSettingsRemoteAjaxController


  • @RestController
    @RequestMapping("/ajax/remote-projects/{projectId}/settings")
    public class ProjectSettingsRemoteAjaxController
    extends java.lang.Object
    Controller for managing settings for a remotely sync'd project asynchronously
    • Constructor Detail

      • ProjectSettingsRemoteAjaxController

        @Autowired
        public ProjectSettingsRemoteAjaxController​(UIRemoteProjectService uiRemoteProjectService)
    • Method Detail

      • updateProjectSyncSettings

        @PostMapping("/sync")
        public org.springframework.http.ResponseEntity<AjaxResponse> updateProjectSyncSettings​(@PathVariable
                                                                                               java.lang.Long projectId,
                                                                                               @RequestBody
                                                                                               RemoteProjectSettingsUpdateRequest remoteProjectSettingsUpdateRequest,
                                                                                               java.security.Principal principal,
                                                                                               java.util.Locale locale)
        Update the remote project sync settings
        Parameters:
        projectId - the project id to update
        remoteProjectSettingsUpdateRequest - object which is used to update frequency, and sync user, as well as force sync for a project
        principal - The current logged in user
        locale - user's locale
        Returns:
        AjaxResponse if error return AjaxErrorResponse otherwise return AjaxUpdateItemSuccessResponse
      • getProjectRemoteSettings

        @RequestMapping("/remote-settings")
        @PreAuthorize("hasPermission(#projectId, \'canManageLocalProjectSettings\')")
        public org.springframework.http.ResponseEntity<RemoteProjectSettings> getProjectRemoteSettings​(@PathVariable
                                                                                                       java.lang.Long projectId,
                                                                                                       java.util.Locale locale)
        Gets the remote synchronization Project settings
        Parameters:
        projectId - the ID of the Project to read
        locale - user's locale
        Returns:
        RemoteProjectSettings object which has the remote project synchronization settings