Class UIRemoteProjectService


  • @Component
    public class UIRemoteProjectService
    extends java.lang.Object
    A utility class for doing operations on remote project sync settings.
    • Constructor Detail

      • UIRemoteProjectService

        @Autowired
        public UIRemoteProjectService​(org.springframework.context.MessageSource messageSource,
                                      ProjectService projectService,
                                      ProjectRemoteService projectRemoteService,
                                      UserService userService)
    • Method Detail

      • updateProjectSyncSettings

        public java.lang.String updateProjectSyncSettings​(java.lang.Long projectId,
                                                          RemoteProjectSettingsUpdateRequest remoteProjectSettingsUpdateRequest,
                                                          java.security.Principal principal,
                                                          java.util.Locale locale)
                                                   throws java.lang.Exception
        Update the 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:
        String
        Throws:
        java.lang.Exception - if user cannot read the remote project or project is not found
      • getProjectRemoteSettings

        public RemoteProjectSettings getProjectRemoteSettings​(java.lang.Long projectId,
                                                              java.util.Locale locale)
                                                       throws java.lang.Exception
        Gets the remote synchronization Project settings
        Parameters:
        projectId - the ID of the Project to read
        locale - user's locale
        Returns:
        RemoteProjectSettings
        Throws:
        java.lang.Exception - throws Exception if project is not found