com.stratelia.webactiv.beans.admin
Class UserDetailsSearchCriteria

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.UserDetailsSearchCriteria
All Implemented Interfaces:
SearchCriteria

public class UserDetailsSearchCriteria
extends Object
implements SearchCriteria

A conjonction of criteria in the search of user details.


Field Summary
static String[] ANY_GROUPS
           
 
Fields inherited from interface com.stratelia.webactiv.beans.admin.SearchCriteria
ANY
 
Constructor Summary
UserDetailsSearchCriteria()
           
 
Method Summary
 UserDetailsSearchCriteria and()
          Useless as by default the criteria forms a conjunction.
 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 getCriterionOnDomainId()
          Gets the domain identifier.
 String[] getCriterionOnGroupIds()
          Gets the disjonction 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 getCriterionOnResourceId()
          Gets the resource in the component instance the user or the group must have priviledge to access.
 String[] getCriterionOnRoleNames()
          Gets the disjonction on the role names.
 String[] getCriterionOnUserIds()
          Gets the disjonction on the user identifiers.
 UserState[] getCriterionOnUserStatesToExclude()
          Gets user states to exclude criterion.
 int hashCode()
           
 boolean isCriterionOnAccessLevelsSet()
           
 boolean isCriterionOnComponentInstanceIdSet()
           
 boolean isCriterionOnDomainIdSet()
           
 boolean isCriterionOnGroupIdsSet()
           
 boolean isCriterionOnNameSet()
           
 boolean isCriterionOnPaginationSet()
           
 boolean isCriterionOnResourceIdSet()
           
 boolean isCriterionOnRoleNamesSet()
           
 boolean isCriterionOnUserIdsSet()
           
 boolean isCriterionOnUserStatesToExcludeSet()
           
 boolean isEmpty()
          Is this criteria empty?
 UserDetailsSearchCriteria onAccessLevels(UserAccessLevel... accessLevels)
          Appends a criterion on the user access level for which the search must be constrained to.
 UserDetailsSearchCriteria onComponentInstanceId(String instanceId)
          Appends a criterion on the component instance for which the search must be constrained to.
 UserDetailsSearchCriteria onDomainId(String domainId)
          Appends a criterion on the user domain for which the search must be constrained to.
 UserDetailsSearchCriteria onGroupIds(String... groupIds)
          Appends a criterion on the user groups for which the search must be constrained to.
 UserDetailsSearchCriteria onName(String name)
          Appends a criterion on the resources name for which the search must be constrained to.
 UserDetailsSearchCriteria onPagination(PaginationPage page)
          Appends a criteria on a resources pagination.
 UserDetailsSearchCriteria onResourceId(String resourceId)
          Appends a criterion on a given component instance's resource for which the search must be constrained to.
 UserDetailsSearchCriteria onRoleNames(String[] roleIds)
          Appends a criterion on the user roles for which the search must be constrained to.
 UserDetailsSearchCriteria onUserIds(String[] userIds)
          Appends a criteria on the user profiles for which the search must be constrained to.
 UserDetailsSearchCriteria onUserStatesToExclude(UserState... userStates)
          Appends a criteria on the user states that must exclude users from the result.
 UserDetailsSearchCriteria or()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_GROUPS

public static String[] ANY_GROUPS
Constructor Detail

UserDetailsSearchCriteria

public UserDetailsSearchCriteria()
Method Detail

onName

public UserDetailsSearchCriteria 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.

Specified by:
onName in interface SearchCriteria
Parameters:
name - a pattern on the name the resources to fetch must have.
Returns:
the criteria enriched with a criterion on the user name.

onComponentInstanceId

public UserDetailsSearchCriteria 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.

Specified by:
onComponentInstanceId in interface SearchCriteria
Parameters:
instanceId - the unique identifier of the component instance.
Returns:
the criteria enriched with a criterion on the component instance.

onRoleNames

public UserDetailsSearchCriteria 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.

Specified by:
onRoleNames in interface SearchCriteria
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.

onGroupIds

public UserDetailsSearchCriteria 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.

Specified by:
onGroupIds in interface SearchCriteria
Parameters:
groupIds - the unique identifiers of the groups.
Returns:
the criteria enriched with a criterion on the user groups.

onDomainId

public UserDetailsSearchCriteria onDomainId(String domainId)
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.

Specified by:
onDomainId in interface SearchCriteria
Parameters:
domainId - the unique identifier of the user domain.
Returns:
the criteria enriched with a criterion on the user domain.

onAccessLevels

public UserDetailsSearchCriteria 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.

Specified by:
onAccessLevels in interface SearchCriteria
Parameters:
accessLevels - the access levels aimed.
Returns:
the criteria enriched with a criterion on the user access level.

onUserStatesToExclude

public UserDetailsSearchCriteria onUserStatesToExclude(UserState... userStates)
Description copied from interface: SearchCriteria
Appends a criteria on the user states that must exclude users from the result. The properties of the resources to fetch have to satisfy this criterion.

Specified by:
onUserStatesToExclude in interface SearchCriteria
Parameters:
userStates - the user states that exclude users from the result.
Returns:
the criteria enriched with a criterion on the user states.

onResourceId

public UserDetailsSearchCriteria 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.

Specified by:
onResourceId in interface SearchCriteria
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.

onUserIds

public UserDetailsSearchCriteria onUserIds(String[] userIds)
Description copied from interface: SearchCriteria
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.

Specified by:
onUserIds in interface SearchCriteria
Parameters:
userIds - the user identifiers.
Returns:
the criteria enriched with a criterion on the user identifiers.

isCriterionOnRoleNamesSet

public boolean isCriterionOnRoleNamesSet()

isCriterionOnResourceIdSet

public boolean isCriterionOnResourceIdSet()

isCriterionOnComponentInstanceIdSet

public boolean isCriterionOnComponentInstanceIdSet()

isCriterionOnUserIdsSet

public boolean isCriterionOnUserIdsSet()

isCriterionOnGroupIdsSet

public boolean isCriterionOnGroupIdsSet()

isCriterionOnDomainIdSet

public boolean isCriterionOnDomainIdSet()

isCriterionOnAccessLevelsSet

public boolean isCriterionOnAccessLevelsSet()

isCriterionOnUserStatesToExcludeSet

public boolean isCriterionOnUserStatesToExcludeSet()

isCriterionOnNameSet

public boolean isCriterionOnNameSet()

isCriterionOnPaginationSet

public boolean isCriterionOnPaginationSet()

getCriterionOnRoleNames

public String[] getCriterionOnRoleNames()
Gets the disjonction on the role names.

Returns:
an array with each element of the disjonction.

getCriterionOnResourceId

public String getCriterionOnResourceId()
Gets the resource in the component instance the user or the group must have priviledge to access.

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.

getCriterionOnUserIds

public String[] getCriterionOnUserIds()
Gets the disjonction on the user identifiers.

Returns:
an array with each element of the disjonction.

getCriterionOnGroupIds

public String[] getCriterionOnGroupIds()
Gets the disjonction on the group identifiers.

Returns:
an array with each element of the disjonction.

getCriterionOnDomainId

public String getCriterionOnDomainId()
Gets the domain identifier.

Returns:
the domain identifier.

getCriterionOnAccessLevels

public UserAccessLevel[] getCriterionOnAccessLevels()
Gets access level criterion.

Returns:
the access level criterion.

getCriterionOnUserStatesToExclude

public UserState[] getCriterionOnUserStatesToExclude()
Gets user states to exclude 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.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

and

public UserDetailsSearchCriteria and()
Useless as by default the criteria forms a conjunction.

Specified by:
and in interface SearchCriteria
Returns:
itself.

or

public UserDetailsSearchCriteria or()
Not supported. By default, the criteria form a conjunction.

Specified by:
or in interface SearchCriteria
Returns:
nothing, thrown an UnsupportedOperationException exception.

isEmpty

public boolean isEmpty()
Description copied from interface: SearchCriteria
Is this criteria empty?

Specified by:
isEmpty in interface SearchCriteria
Returns:
true if this criteria has no criterion, false otherwise.

onPagination

public UserDetailsSearchCriteria onPagination(PaginationPage page)
Description copied from interface: SearchCriteria
Appends a criteria 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.

Specified by:
onPagination in interface SearchCriteria
Parameters:
page - the page of resources to fetch.
Returns:
the criteria enriched with a criterion on the resources pagination.


Copyright © 2016 Silverpeas. All Rights Reserved.