Class GroupsSearchCriteria
- java.lang.Object
-
- org.silverpeas.core.admin.user.model.AbstractSearchCriteria
-
- org.silverpeas.core.admin.user.model.GroupsSearchCriteria
-
- All Implemented Interfaces:
SearchCriteria
public class GroupsSearchCriteria extends AbstractSearchCriteria
A conjunction of criteria in the search of user groups.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.admin.user.model.SearchCriteria
SearchCriteria.Constants
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.admin.user.model.AbstractSearchCriteria
criteria
-
-
Constructor Summary
Constructors Constructor Description GroupsSearchCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
childrenRequired()
GroupsSearchCriteria
clearOnName()
SearchCriteria
clearPagination()
boolean
equals(Object obj)
UserAccessLevel[]
getCriterionOnAccessLevels()
Gets access level criterion.String
getCriterionOnComponentInstanceId()
Gets the component instance the user or the group must belongs to.String[]
getCriterionOnDomainIds()
Gets the domain identifier onto which the groups must belong.String[]
getCriterionOnGroupIds()
Gets the conjunction on the group identifiers.String
getCriterionOnName()
Gets the pattern on the name the group or the user name must satisfy.PaginationPage
getCriterionOnPagination()
Gets the pagination page into which the groups to return has to be part.String[]
getCriterionOnProfileIds()
Gets the conjunction on the profile ids.String
getCriterionOnResourceId()
Gets the resource for which the user or the group must have access rights.String
getCriterionOnSuperGroupId()
Gets the conjunction on the super group identifiers.String[]
getCriterionOnUserIds()
Gets the conjunction on the user identifiers.int
hashCode()
GroupsSearchCriteria
includeRemovedUsers()
Forces to take into account removed users.boolean
isCriterionOnAccessLevelsSet()
boolean
isCriterionOnComponentInstanceIdSet()
boolean
isCriterionOnDomainIdSet()
boolean
isCriterionOnGroupIdsSet()
boolean
isCriterionOnMixedDomainIdSet()
boolean
isCriterionOnNameSet()
boolean
isCriterionOnPaginationSet()
boolean
isCriterionOnProfileIdsSet()
boolean
isCriterionOnResourceIdSet()
boolean
isCriterionOnSuperGroupIdSet()
boolean
isCriterionOnUserIdsSet()
boolean
isEmpty()
Is this criteria empty?boolean
mustBeRoot()
boolean
mustMatchAllRoles()
Must each result item matches all role names.GroupsSearchCriteria
onAccessLevels(UserAccessLevel... accessLevels)
Appends a criterion on the user access level for which the search must be constrained to.GroupsSearchCriteria
onAsRootGroup()
The groups must be root ones.GroupsSearchCriteria
onComponentInstanceId(String instanceId)
Appends a criterion on the component instance for which the search must be constrained to.GroupsSearchCriteria
onDomainIds(String... domainIds)
Appends a criterion on the user domain for which the search must be constrained to.GroupsSearchCriteria
onGroupIds(String... groupIds)
Appends a criterion on the user groups for which the search must be constrained to.GroupsSearchCriteria
onMixedDomainOrOnDomainId(String domainId)
The groups must belong to either the mixed domain or the specified one.GroupsSearchCriteria
onName(String name)
Appends a criterion on the resources name for which the search must be constrained to.SearchCriteria
onPagination(PaginationPage page)
Appends a criterion on a resources pagination.GroupsSearchCriteria
onProfileIds(String... profileIds)
SearchCriteria
onResourceId(String resourceId)
Appends a criterion on a given component instance's resource for which the search must be constrained to.GroupsSearchCriteria
onRoleNames(String... roleIds)
Appends a criterion on the user roles for which the search must be constrained to.GroupsSearchCriteria
onSuperGroupId(String superGroupId)
The groups must have as parent the specified super group.SearchCriteria
onUserIds(String... userIds)
Not relevent here.SearchCriteria
onUserSpecificIds(String... userSpecificIds)
Appends a criterion on the user profiles for which the search must be constrained to.GroupsSearchCriteria
onUserStatesToExclude(UserState... userStates)
Appends a criterion on the user states to be excluded in the search of users.GroupsSearchCriteria
withChildren()
Indicates to service to retrieve all the children (of matching groups) which are matching the criteria.-
Methods inherited from class org.silverpeas.core.admin.user.model.AbstractSearchCriteria
getCriterionOnRoleNames, getCriterionOnUserStatesToExclude, isCriterionOnRoleNamesSet, isCriterionOnUserStatesToExcludeSet, matchingAllRoleNames, mustIncludeRemovedUsers
-
-
-
-
Method Detail
-
onName
public GroupsSearchCriteria onName(String name)
Description copied from interface:SearchCriteria
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.
-
clearOnName
public GroupsSearchCriteria clearOnName()
-
onComponentInstanceId
public GroupsSearchCriteria onComponentInstanceId(String instanceId)
Description copied from interface:SearchCriteria
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.
-
withChildren
public GroupsSearchCriteria withChildren()
Indicates to service to retrieve all the children (of matching groups) which are matching the criteria.- Returns:
- the criteria enriched with the directive of getting also the children.
-
onRoleNames
public GroupsSearchCriteria onRoleNames(String... roleIds)
Description copied from interface:SearchCriteria
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.
- Specified by:
onRoleNames
in interfaceSearchCriteria
- Overrides:
onRoleNames
in classAbstractSearchCriteria
- Parameters:
roleIds
- 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.
-
onProfileIds
public GroupsSearchCriteria onProfileIds(String... profileIds)
-
onGroupIds
public GroupsSearchCriteria onGroupIds(String... groupIds)
Description copied from interface:SearchCriteria
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.
-
onAsRootGroup
public GroupsSearchCriteria onAsRootGroup()
The groups must be root ones.- Returns:
- itself.
-
onSuperGroupId
public GroupsSearchCriteria onSuperGroupId(String superGroupId)
The groups must have as parent the specified super group.- Parameters:
superGroupId
- the unique identifier of the super group.- Returns:
- itself.
-
onDomainIds
public GroupsSearchCriteria onDomainIds(String... domainIds)
Description copied from interface:SearchCriteria
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.
-
onAccessLevels
public GroupsSearchCriteria onAccessLevels(UserAccessLevel... accessLevels)
Description copied from interface:SearchCriteria
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.
-
onUserStatesToExclude
public GroupsSearchCriteria onUserStatesToExclude(UserState... userStates)
Description copied from interface:SearchCriteria
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.- Specified by:
onUserStatesToExclude
in interfaceSearchCriteria
- Overrides:
onUserStatesToExclude
in classAbstractSearchCriteria
- Parameters:
userStates
- the user states that exclude users from the result.- Returns:
- the criteria enriched with a criterion on the user states.
-
includeRemovedUsers
public GroupsSearchCriteria includeRemovedUsers()
Description copied from interface:SearchCriteria
Forces to take into account removed users.This method has priority over the
SearchCriteria.onUserStatesToExclude(UserState...)
one. It means that ifSearchCriteria.includeRemovedUsers()
is called thenUserState.REMOVED
state is removed from result ofSearchCriteria.onUserStatesToExclude(UserState...)
method call.- Specified by:
includeRemovedUsers
in interfaceSearchCriteria
- Overrides:
includeRemovedUsers
in classAbstractSearchCriteria
- Returns:
- the criteria enriched with a criterion on the user states.
-
onMixedDomainOrOnDomainId
public GroupsSearchCriteria onMixedDomainOrOnDomainId(String domainId)
The groups must belong to either the mixed domain or the specified one.- Parameters:
domainId
- the unique identifier of a domain.- Returns:
- itself.
-
isCriterionOnProfileIdsSet
public boolean isCriterionOnProfileIdsSet()
-
isCriterionOnResourceIdSet
public boolean isCriterionOnResourceIdSet()
-
isCriterionOnComponentInstanceIdSet
public boolean isCriterionOnComponentInstanceIdSet()
-
isCriterionOnSuperGroupIdSet
public boolean isCriterionOnSuperGroupIdSet()
-
isCriterionOnGroupIdsSet
public boolean isCriterionOnGroupIdsSet()
-
isCriterionOnDomainIdSet
public boolean isCriterionOnDomainIdSet()
-
isCriterionOnAccessLevelsSet
public boolean isCriterionOnAccessLevelsSet()
-
isCriterionOnMixedDomainIdSet
public boolean isCriterionOnMixedDomainIdSet()
-
isCriterionOnUserIdsSet
public boolean isCriterionOnUserIdsSet()
-
isCriterionOnNameSet
public boolean isCriterionOnNameSet()
-
isCriterionOnPaginationSet
public boolean isCriterionOnPaginationSet()
-
childrenRequired
public boolean childrenRequired()
-
mustBeRoot
public boolean mustBeRoot()
-
getCriterionOnProfileIds
public String[] getCriterionOnProfileIds()
Gets the conjunction on the profile ids.- Returns:
- an array with each element of the conjunction.
-
mustMatchAllRoles
public boolean mustMatchAllRoles()
Description copied from class:AbstractSearchCriteria
Must each result item matches all role names.- Overrides:
mustMatchAllRoles
in classAbstractSearchCriteria
- Returns:
- true if it must match all roles, false otherwise.
-
getCriterionOnResourceId
public String getCriterionOnResourceId()
Gets the resource for which the user or the group must have access rights.- Returns:
- the unique identifier of the resource in a component instance.
-
getCriterionOnComponentInstanceId
public String getCriterionOnComponentInstanceId()
Gets the component instance the user or the group must belongs to.- Returns:
- the unique identifier of the component instance.
-
getCriterionOnSuperGroupId
public String getCriterionOnSuperGroupId()
Gets the conjunction on the super group identifiers.- Returns:
- an array with each element of the conjunction.
-
getCriterionOnUserIds
public String[] getCriterionOnUserIds()
Gets the conjunction on the user identifiers.- Returns:
- an array with each element of the conjunction.
-
getCriterionOnGroupIds
public String[] getCriterionOnGroupIds()
Gets the conjunction on the group identifiers.- Returns:
- an array with each element of the conjunction.
-
getCriterionOnDomainIds
public String[] getCriterionOnDomainIds()
Gets the domain identifier onto which the groups must belong. It can include the mixed domain.- Returns:
- the identifier of the domain.
-
getCriterionOnAccessLevels
public UserAccessLevel[] getCriterionOnAccessLevels()
Gets access level criterion.- Returns:
- the access level criterion.
-
getCriterionOnName
public String getCriterionOnName()
Gets the pattern on the name the group or the user name must satisfy.- Returns:
- a pattern on the user or group name.
-
getCriterionOnPagination
public PaginationPage getCriterionOnPagination()
Gets the pagination page into which the groups to return has to be part.- Returns:
- the page in a pagination mechanism to fetch.
-
isEmpty
public boolean isEmpty()
Description copied from interface:SearchCriteria
Is this criteria empty?- Returns:
- true if this object has no any criteria, false otherwise.
-
onUserIds
public SearchCriteria onUserIds(String... userIds)
Not relevent here. Does nothing.- Parameters:
userIds
- the user identifiers.- Returns:
- itself.
-
onUserSpecificIds
public SearchCriteria onUserSpecificIds(String... userSpecificIds)
Description copied from interface:SearchCriteria
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.
-
onResourceId
public SearchCriteria onResourceId(String resourceId)
Description copied from interface:SearchCriteria
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.
-
onPagination
public SearchCriteria onPagination(PaginationPage page)
Description copied from interface:SearchCriteria
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.
-
clearPagination
public SearchCriteria clearPagination()
-
-