Interface SearchCriteria

  • All Known Implementing Classes:
    GroupsSearchCriteria, UserDetailsSearchCriteria

    public interface SearchCriteria
    Criteria to use in a search of resources managed and exposed in Silverpeas (like user profiles or user groups).
    • Method Detail

      • onComponentInstanceId

        SearchCriteria onComponentInstanceId​(String instanceId)
        Appends a criterion on the component instance for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion.
        Parameters:
        instanceId - the unique identifier of the component instance.
        Returns:
        the criteria enriched with a criterion on the component instance.
      • onResourceId

        SearchCriteria onResourceId​(String resourceId)
        Appends a criterion on a given component instance's resource for which the search must be constrained to. This criterion has a meaning only when coupled with the criterion on the component instance. The properties of the resources to fetch have to satisfy both the criterion on the component instance and this one.
        Parameters:
        resourceId - the unique identifier of the resource managed in the component instance. As each resource is particular to a given Silverpeas component, the unique identifier is made up of the resource type and of the resource identifier.
        Returns:
        the criteria enriched with a criterion on the resource in the component instance.
      • onDomainIds

        SearchCriteria onDomainIds​(String... domainIds)
        Appends a criterion on the user domain for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion. This criterion replaces any previous criterion on the user domains.
        Parameters:
        domainIds - the unique identifier of the user domain.
        Returns:
        the criteria enriched with a criterion on the user domain.
      • onGroupIds

        SearchCriteria onGroupIds​(String... groupIds)
        Appends a criterion on the user groups for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion. This criterion replaces any previous criterion on the user groups.
        Parameters:
        groupIds - the unique identifiers of the groups.
        Returns:
        the criteria enriched with a criterion on the user groups.
      • onAccessLevels

        SearchCriteria onAccessLevels​(UserAccessLevel... accessLevels)
        Appends a criterion on the user access level for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion. This criterion replaces any previous criterion on the user access levels.
        Parameters:
        accessLevels - the access levels aimed.
        Returns:
        the criteria enriched with a criterion on the user access level.
      • onName

        SearchCriteria onName​(String name)
        Appends a criterion on the resources name for which the search must be constrained to. The name of the resources to fetch have to satisfy this criterion.
        Parameters:
        name - a pattern on the name the resources to fetch must have.
        Returns:
        the criteria enriched with a criterion on the resource name.
      • onRoleNames

        SearchCriteria onRoleNames​(String... roleNames)
        Appends a criterion on the user roles for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion. This criterion replaces any previous criterion on the user roles.

        This criterion is useless without any criterion on either the component instance or on both the component instance and the resource for which the roles are defined.

        Parameters:
        roleNames - the name of the user roles on which the criterion has to be built.
        Returns:
        the criteria enriched with a criterion on the role names.
      • onUserIds

        SearchCriteria onUserIds​(String... userIds)
        Appends a criteria on the user profiles for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion. This criterion replaces any previous criterion on the user profiles.
        Parameters:
        userIds - the user identifiers.
        Returns:
        the criteria enriched with a criterion on the user identifiers.
      • onUserSpecificIds

        SearchCriteria onUserSpecificIds​(String... userSpecificIds)
        Appends a criterion on the user profiles for which the search must be constrained to. The properties of the resources to fetch have to satisfy this criterion.

        One, and only one, domain id will be mandatory!

        This criterion replaces any previous criterion on the user profiles.
        Parameters:
        userSpecificIds - the user specific identifiers.
        Returns:
        the criteria enriched with a criterion on the user identifiers.
      • onUserStatesToExclude

        SearchCriteria onUserStatesToExclude​(UserState... userStates)
        Appends a criterion on the user states to be excluded in the search of users. The properties of the resources to fetch have to satisfy this criterion. By default, the deleted users are always excluded but not the removed users. Latter have to be explicitly excluded. This criterion replaces any previous criterion on the user states.
        Parameters:
        userStates - the user states that exclude users from the result.
        Returns:
        the criteria enriched with a criterion on the user states.
      • onPagination

        SearchCriteria onPagination​(PaginationPage page)
        Appends a criterion on a resources pagination. The pagination is a mechanism to distribute the resources to fetch in one or more pages of same size and to navigate among theses different available pages. Yet, this criterion is about the page of resources to fetch.
        Parameters:
        page - the page of resources to fetch.
        Returns:
        the criteria enriched with a criterion on the resources pagination.
      • isEmpty

        boolean isEmpty()
        Is this criteria empty?
        Returns:
        true if this object has no any criteria, false otherwise.