Interface SUser

    • Method Detail

      • getVcsModifications

        @NotNull
        List<SVcsModification> getVcsModifications​(int numberOfActiveDays)
        Returns the list of changes made by this user filtered according to the caller's permissions.
        Parameters:
        numberOfActiveDays - number of last active days of changing
        Returns:
        unmodifiable list of user changes
        Since:
        5.0
      • getAllModifications

        @NotNull
        List<SVcsModification> getAllModifications()
        Returns the list of all (personal and non-personal) user modifications sorted by VCS date. Returns only modifications which have at least one related configuration.
        Returns:
        see above
        Since:
        6.0
      • setUserProperties

        void setUserProperties​(@NotNull
                               Map<? extends PropertyKey,​String> properties)
                        throws UserNotFoundException
        Updates properties of the user specified by user id. Only those properties will be updated which keys are specified in the properties map. All other properties will be left intact.
        Parameters:
        properties - properties
        Throws:
        UserNotFoundException - if specified user no longer exists
      • setUserProperty

        void setUserProperty​(@NotNull
                             PropertyKey propertyKey,
                             String value)
                      throws UserNotFoundException
        Sets a property with specified key and value in user profile
        Parameters:
        propertyKey - property key
        value - value of the property
        Throws:
        UserNotFoundException - if specified user no longer exists
      • deleteUserProperty

        void deleteUserProperty​(@NotNull
                                PropertyKey propertyKey)
                         throws UserNotFoundException
        Deletes a property with specified key from the user profile.
        Parameters:
        propertyKey - property key
        Throws:
        UserNotFoundException - if specified user no longer exists
      • getProjectsOrder

        @NotNull
        List<String> getProjectsOrder()
                               throws UserNotFoundException
        Returns:
        List of project internal IDs in configured order. Empty list will be returned in case user didn't configure any order.
        Throws:
        UserNotFoundException - if specified user no longer exists
        Since:
        10.0
      • setProjectsOrder

        void setProjectsOrder​(@NotNull
                              List<String> projectsOrder)
                       throws UserNotFoundException
        Sets order of the projects.
        Parameters:
        projectsOrder - identificators of all projects in the order specified by user
        Throws:
        UserNotFoundException - if specified user no longer exists
      • setVisibleProjects

        void setVisibleProjects​(@NotNull
                                Collection<String> visibleProjects)
                         throws UserNotFoundException
        Sets projects visible for specified user
        Parameters:
        visibleProjects - collection of identifiers of visible projects
        Throws:
        UserNotFoundException - if specified user no longer exists
      • hideProject

        void hideProject​(@NotNull
                         String projectId)
                  throws UserNotFoundException
        Marks a project with specified id as invisible
        Parameters:
        projectId - id of the project
        Throws:
        UserNotFoundException - if this user does not exist anymore
      • setLastLoginTimestamp

        void setLastLoginTimestamp​(@NotNull
                                   Date timestamp)
                            throws UserNotFoundException
        Updates last login timestamp
        Parameters:
        timestamp - last login timestamp
        Throws:
        UserNotFoundException - if this user does not exist anymore
      • setBlockState

        void setBlockState​(String blockType,
                           String blockState)
        Stores collapsable block state for this user
        Parameters:
        blockType - type of block
        blockState - state
      • getBlockState

        @Nullable
        String getBlockState​(String blockType)
        Retrieves state of a block stored for this user
        Parameters:
        blockType - type of block
        Returns:
        block state or null
      • getUserGroups

        @NotNull
        List<UserGroup> getUserGroups()
        Returns the list of groups which this user belongs to. Only groups which contain this user directly are considered. If you need all user groups use getAllUserGroups().

        No specific order of the groups is guaranteed.

        Returns:
        list of groups containing this user
        Since:
        4.5
        See Also:
        getAllUserGroups()
      • getAllUserGroups

        @NotNull
        List<UserGroup> getAllUserGroups()
        Returns the list of all user groups that include this user, directly or through intermediate subgroups.

        No specific order of the groups is guaranteed.

        Returns:
        list of all groups containing this user
        Since:
        4.5
        See Also:
        getUserGroups()
      • getVcsUsernameProperties

        @NotNull
        List<VcsUsernamePropertyKey> getVcsUsernameProperties()
        Returns list of VCS username properties associated with this user. VCS username property defines username of this user in a concrete VCS root or VCS repository type (Subversion, Perforce, etc).
        Returns:
        list of VCS usernames
      • getOrderedBuildTypes

        @NotNull
        List<SBuildType> getOrderedBuildTypes​(@Nullable
                                              SProject project)
        Returns the list of build configurations (in a project, or globally) sorted according to user settings. The configurations invisible for the user are omitted.
        Parameters:
        project - the project (can be null)
        Returns:
        the list of build configurations
        Since:
        5.1
      • getBuildTypesOrder

        @NotNull
        Collection<SBuildType> getBuildTypesOrder​(@NotNull
                                                  SProject project)
        Parameters:
        project - the project
        Returns:
        List of build configurations in configured order. Empty list will be returned in case user didn't configure any order.
        Since:
        10.0
      • setBuildTypesOrder

        void setBuildTypesOrder​(@NotNull
                                SProject project,
                                @NotNull
                                List<SBuildType> visible,
                                @NotNull
                                List<SBuildType> invisible)
        Sets visible and invisible build types for the given project in the specified order.
        Parameters:
        project - the project
        visible - the list of visible build types
        invisible - the list of invisible build types
        Since:
        5.1
      • isHighlightRelatedDataInUI

        boolean isHighlightRelatedDataInUI()
        Returns true if highlighting of user changes, investigations, and other related data in web UI is enabled. The value is controlled by the StandardProperties.HIGHLIGHT_MY_CHANGES property.
        Returns:
        true if highlighting of user changes, investigations, and other related data in web UI is enabled.
        Since:
        7.1
      • isGuest

        boolean isGuest()
        Returns true if the user is guest
        Since:
        2017.2