Interface SUser

    • Method Detail

      • getVcsModifications

        @NotNull
        java.util.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
        java.util.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
                               java.util.Map<? extends PropertyKey,​java.lang.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,
                             java.lang.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
      • setPassword

        void setPassword​(java.lang.String password)
                  throws UserNotFoundException
        Changes password of this user
        Parameters:
        password - new password
        Throws:
        UserNotFoundException - if specified user no longer exists
      • getProjectsOrder

        @NotNull
        java.util.List<java.lang.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
                              java.util.List<java.lang.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
                                java.util.Collection<java.lang.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
                         java.lang.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
                                   java.util.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​(java.lang.String blockType,
                           java.lang.String blockState)
        Stores collapsable block state for this user
        Parameters:
        blockType - type of block
        blockState - state
      • getBlockState

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

        @NotNull
        java.util.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
        java.util.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
        java.util.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
        java.util.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
        java.util.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
                                java.util.List<SBuildType> visible,
                                @NotNull
                                java.util.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