Class UserProfilesSearchCriteriaBuilder


  • public class UserProfilesSearchCriteriaBuilder
    extends Object
    A builder of search criteria on user profiles.
    • Method Detail

      • withName

        public UserProfilesSearchCriteriaBuilder withName​(String name)
        The users to find should satisfy the specified name. The wildcard character '*' is supported to mean any characters.
        Parameters:
        name - the name of a user. It can be the firstname or the lastname of the users to search.
        Returns:
        itself.
      • withComponentInstanceId

        public UserProfilesSearchCriteriaBuilder withComponentInstanceId​(String instanceId)
        The users to find have an access right on the specified component instance.
        Parameters:
        instanceId - the unique identifier of a component instance.
        Returns:
      • withResourceId

        public UserProfilesSearchCriteriaBuilder withResourceId​(String resourceId)
        The users to find have an access right on the specified resource. The component instance should be set with the method withComponentInstanceId(String) in order to refer exactly the resource.
        Parameters:
        resourceId - the unique identifier of a resource in a given component instance.
        Returns:
        itself.
      • withRoles

        public UserProfilesSearchCriteriaBuilder withRoles​(String[] roleIds,
                                                           boolean matchingAllRoles)
        The users to find have to play at least one of the specified roles.
        Parameters:
        roleIds - one or more identifiers of roles.
        matchingAllRoles - one or more identifiers of roles.
        Returns:
        itself.
      • withGroupIds

        public UserProfilesSearchCriteriaBuilder withGroupIds​(String... groupIds)
        The users to find have to be at least in one of the specified user groups.
        Parameters:
        groupIds - one or more unique identifiers of user groups.
        Returns:
        itself.
      • withDomainIds

        public UserProfilesSearchCriteriaBuilder withDomainIds​(String... domainIds)
        The users to find have to be at least in one of the specified user directory domains.
        Parameters:
        domainIds - one or more unique identifiers of domains.
        Returns:
        itself.
      • withAccessLevels

        public UserProfilesSearchCriteriaBuilder withAccessLevels​(UserAccessLevel... accessLevels)
        The users to find must have at least one of the specified access levels
        Parameters:
        accessLevels - one or more access levels.
        Returns:
        itself.
      • withUserIds

        public UserProfilesSearchCriteriaBuilder withUserIds​(String... userIds)
        The users to find are those with the specified unique identifiers of users.
        Parameters:
        userIds - one ore more unique identifiers of users;
        Returns:
        itself.
      • withUserSpecificIds

        public UserProfilesSearchCriteriaBuilder withUserSpecificIds​(String... userSpecificIds)
        The users to find are those with the specified domain specific identifiers of users.
        Parameters:
        userSpecificIds - one ore more domain specific identifiers of users;
        Returns:
        itself.
      • withUserStatesToExclude

        public UserProfilesSearchCriteriaBuilder withUserStatesToExclude​(UserState... userStates)
        Excludes from the search scope the users with the specified states. The deleted users are always excluded as to be expected. Be cautious, by default the removed users are here also excluded but they can be included explicitly by invoking the method includeAlsoRemovedUsers().
        Parameters:
        userStates - the states the users to find must not have.
        Returns:
        itself.
      • includeAlsoRemovedUsers

        public UserProfilesSearchCriteriaBuilder includeAlsoRemovedUsers()
        Includes also among the users to find those they are removed.
        Returns:
        itself.
      • withPaginationPage

        public UserProfilesSearchCriteriaBuilder withPaginationPage​(PaginationPage page)
        The search results are paginated and only the specified page should be returned from the search results.
        Parameters:
        page - the page corresponding to a paginated search results.
        Returns:
        itself.