Interface UserAccessorInternal

    • Method Detail

      • getExistingUserByPerson

        @Nullable ConfluenceUser getExistingUserByPerson​(Person person)
        Retrieve the corresponding ConfluenceUser (if any) for a Person, by username, or user key
        Specified by:
        getExistingUserByPerson in interface ConfluenceUserResolver
        Parameters:
        person - the person whose corresponding ConfluenceUser should be retrieved
        Returns:
        Person as a confluence user, or null if user doesn't exist or if person is Anonymous
        Throws:
        IllegalArgumentException - if person has neither username nor user key
        Since:
        5.8
      • getExistingByApiUser

        Optional<ConfluenceUser> getExistingByApiUser​(User user)
        Retrieve the corresponding ConfluenceUser (if any) for a user, by user key or username

        One of username or userkey must be set on the user object.

        This method differs from getExistingUserByPerson(com.atlassian.confluence.api.model.people.Person) in its handling of anonymous, it is not possible to retrieve an anonymous user from this method. When a Option.none() is returned from this method it indicates that the user was not found in the user repository.

        Specified by:
        getExistingByApiUser in interface ConfluenceUserResolver
        Parameters:
        user - the user whose corresponding ConfluenceUser should be retrieved
        Returns:
        an optional confluence user if the user is found by userkey or username
        Throws:
        IllegalArgumentException - if user parameter has neither username nor user key
        Since:
        7.0.1
      • isDeletedUser

        boolean isDeletedUser​(ConfluenceUser user)
        Checks whether or not a user has been deleted from the application
        Parameters:
        user - the user to check
        Returns:
        true if the user has been deleted from the application, false otherwise (even if the user doesn't exist)
        Since:
        6.13.0
      • isUnsyncedUser

        boolean isUnsyncedUser​(ConfluenceUser user)
        Checks whether or not a user is unsynced
        Parameters:
        user - the user to check
        Returns:
        true if the user is unsynced, false otherwise (even if the user doesn't exist)
        Since:
        6.13.0
      • isCrowdManaged

        boolean isCrowdManaged​(ConfluenceUser user)
        Checks whether or not embedded Crowd manages/has knowledge of a given user
        Returns:
        true if the user is managed by embedded Crowd, false otherwise (even if the user doesn't exist)
        Since:
        6.13.0
      • searchUnsyncedUsers

        com.atlassian.user.search.page.Pager<ConfluenceUser> searchUnsyncedUsers​(String searchParam)
        Returns a list of all users for the given username search parameter that are unsynced: a user whose account has been disconnected from an external directory, i.e. a user who has a known mapping but no backing user, but who has not yet been deleted from the application.
        Parameters:
        searchParam - the username parameter to search by
        Returns:
        a pager of all unknown / unsynced users
        Since:
        6.13.0