Class AbstractSearchCriteria
- java.lang.Object
-
- org.silverpeas.core.admin.user.model.AbstractSearchCriteria
-
- All Implemented Interfaces:
SearchCriteria
- Direct Known Subclasses:
GroupsSearchCriteria
,UserDetailsSearchCriteria
public abstract class AbstractSearchCriteria extends Object implements SearchCriteria
- Author:
- silveryocha
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.admin.user.model.SearchCriteria
SearchCriteria.Constants
-
-
Constructor Summary
Constructors Constructor Description AbstractSearchCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getCriterionOnRoleNames()
Gets the disjunction on the role names.UserState[]
getCriterionOnUserStatesToExclude()
Gets user states to exclude criterion.SearchCriteria
includeRemovedUsers()
Forces to take into account removed users.boolean
isCriterionOnRoleNamesSet()
Is the criterion on role names set?boolean
isCriterionOnUserStatesToExcludeSet()
Is the user states to exclude criterion set?SearchCriteria
matchingAllRoleNames()
Specifies that each result item MUST match all specified roles if any.boolean
mustIncludeRemovedUsers()
Must the removed users be included criterion.boolean
mustMatchAllRoles()
Must each result item matches all role names.SearchCriteria
onRoleNames(String... roleIds)
Appends a criterion on the user roles for which the search must be constrained to.SearchCriteria
onUserStatesToExclude(UserState... userStates)
Appends a criterion on the user states to be excluded in the search of users.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.admin.user.model.SearchCriteria
isEmpty, onAccessLevels, onComponentInstanceId, onDomainIds, onGroupIds, onName, onPagination, onResourceId, onUserIds, onUserSpecificIds
-
-
-
-
Method Detail
-
onUserStatesToExclude
public SearchCriteria 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
- Parameters:
userStates
- the user states that exclude users from the result.- Returns:
- the criteria enriched with a criterion on the user states.
-
includeRemovedUsers
public SearchCriteria 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
- Returns:
- the criteria enriched with a criterion on the user states.
-
onRoleNames
public SearchCriteria 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
- 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.
-
matchingAllRoleNames
public SearchCriteria matchingAllRoleNames()
Description copied from interface:SearchCriteria
Specifies that each result item MUST match all specified roles if any.If no role criteria is set, this criteria has no effect.
- Specified by:
matchingAllRoleNames
in interfaceSearchCriteria
- Returns:
- the criteria enriched with a criterion on the role name clause.
-
isCriterionOnUserStatesToExcludeSet
public boolean isCriterionOnUserStatesToExcludeSet()
Is the user states to exclude criterion set?- Returns:
- true if set, false otherwise.
-
isCriterionOnRoleNamesSet
public boolean isCriterionOnRoleNamesSet()
Is the criterion on role names set?- Returns:
- true if set, false otherwise.
-
getCriterionOnUserStatesToExclude
public UserState[] getCriterionOnUserStatesToExclude()
Gets user states to exclude criterion.- Returns:
- the access level criterion.
-
mustIncludeRemovedUsers
public boolean mustIncludeRemovedUsers()
Must the removed users be included criterion.- Returns:
- true if removed users must be taken into account, false otherwise.
-
getCriterionOnRoleNames
public String[] getCriterionOnRoleNames()
Gets the disjunction on the role names.- Returns:
- an array with each element of the disjunction.
-
mustMatchAllRoles
public boolean mustMatchAllRoles()
Must each result item matches all role names.- Returns:
- true if it must match all roles, false otherwise.
-
-