Class ProjectSettingsRemoteAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.projects.settings.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 Summary
Constructors Constructor Description ProjectSettingsRemoteAjaxController(UIRemoteProjectService uiRemoteProjectService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<RemoteProjectSettings>
getProjectRemoteSettings(java.lang.Long projectId, java.util.Locale locale)
Gets the remote synchronizationProject
settingsorg.springframework.http.ResponseEntity<AjaxResponse>
updateProjectSyncSettings(java.lang.Long projectId, RemoteProjectSettingsUpdateRequest remoteProjectSettingsUpdateRequest, java.security.Principal principal, java.util.Locale locale)
Update the remote project sync settings
-
-
-
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 updateremoteProjectSettingsUpdateRequest
- object which is used to update frequency, and sync user, as well as force sync for a projectprincipal
- The current logged in userlocale
- 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 synchronizationProject
settings- Parameters:
projectId
- the ID of theProject
to readlocale
- user's locale- Returns:
RemoteProjectSettings
object which has the remote project synchronization settings
-
-