org.eclipse.stardust.engine.api.query
Class ParticipantAssociationFilter

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.ParticipantAssociationFilter
All Implemented Interfaces:
Serializable, FilterCriterion
Direct Known Subclasses:
ParticipantGrantFilter

public class ParticipantAssociationFilter
extends Object
implements FilterCriterion

Filter criterion for restricting UserQuerys producing users having granted specific roles/organizations or being members of specific user groups.

A usage examples is to retrieve all users being administrators.

Since:
3.1
Version:
$Revision$
Author:
sborn
See Also:
Serialized Form

Nested Class Summary
static class ParticipantAssociationFilter.Kind
          Enumeration for participant grant filter kind definitions.
 
Field Summary
static ParticipantAssociationFilter.Kind FILTER_KIND_DEPARTMENT
          Constant marking a department filter.
static ParticipantAssociationFilter.Kind FILTER_KIND_MODEL_PARTICIPANT
          Constant marking a model participant grant filter.
static ParticipantAssociationFilter.Kind FILTER_KIND_TEAM_LEADER
          Constant marking a team leader filter.
static ParticipantAssociationFilter.Kind FILTER_KIND_USER
          Constant marking a user filter.
static ParticipantAssociationFilter.Kind FILTER_KIND_USER_GROUP
          Constant marking a user group membership filter.
 
Method Summary
 Object accept(FilterEvaluationVisitor visitor, Object context)
          Visitor dispatch callback used for evaluating filter criteria.
static ParticipantAssociationFilter forDepartment(DepartmentInfo department)
          Constructs a filter criterion matching the department identified by the given DepartmentInfo instance.
static ParticipantAssociationFilter forModelParticipant(String participantID)
          Deprecated. Superseded by forParticipant(ParticipantInfo)
static ParticipantAssociationFilter forModelParticipant(String participantID, boolean recursively)
          Deprecated. Superseded by forParticipant(ParticipantInfo, boolean)
static ParticipantAssociationFilter forParticipant(ParticipantInfo participant)
          Constructs a filter criterion matching the participant identified by the given ParticipantInfo.
static ParticipantAssociationFilter forParticipant(ParticipantInfo participant, boolean recursively)
          Constructs a filter criterion matching the participant identified by the given ParticipantInfo.
static ParticipantAssociationFilter forTeamLeader(RoleInfo role)
          Constructs a filter criterion matching the team leader role identified by the given RoleInfo.
static ParticipantAssociationFilter forTeamLeader(String roleId)
          Deprecated. Superseded by forTeamLeader(RoleInfo)
static ParticipantAssociationFilter forUser(String account)
          Deprecated. Superseded by forParticipant(ParticipantInfo)
 ParticipantAssociationFilter.Kind getFilterKind()
          Retrieves the ParticipantAssociationFilter.Kind of the filter.
 ParticipantInfo getParticipant()
          Retrieves the ParticipantInfo to filter for.
 String getParticipantID()
          Retrieves the ID of the participant to filter for.
static ParticipantAssociationFilter inUserGroup(String groupID)
          Deprecated. Superseded by forParticipant(ParticipantInfo)
 boolean isRecursively()
          Retrieves whether this filter will match a participant hierarchy or just a specific participant.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_KIND_MODEL_PARTICIPANT

public static final ParticipantAssociationFilter.Kind FILTER_KIND_MODEL_PARTICIPANT
Constant marking a model participant grant filter.


FILTER_KIND_USER_GROUP

public static final ParticipantAssociationFilter.Kind FILTER_KIND_USER_GROUP
Constant marking a user group membership filter.


FILTER_KIND_USER

public static final ParticipantAssociationFilter.Kind FILTER_KIND_USER
Constant marking a user filter.


FILTER_KIND_TEAM_LEADER

public static final ParticipantAssociationFilter.Kind FILTER_KIND_TEAM_LEADER
Constant marking a team leader filter.


FILTER_KIND_DEPARTMENT

public static final ParticipantAssociationFilter.Kind FILTER_KIND_DEPARTMENT
Constant marking a department filter.

Method Detail

forModelParticipant

public static ParticipantAssociationFilter forModelParticipant(String participantID)
Deprecated. Superseded by forParticipant(ParticipantInfo)

Constructs a filter criterion matching exactly the given model participant.

Parameters:
participantID - The ID of the model participant to filter for.

forModelParticipant

public static ParticipantAssociationFilter forModelParticipant(String participantID,
                                                               boolean recursively)
Deprecated. Superseded by forParticipant(ParticipantInfo, boolean)

Constructs a filter criterion matching the closure of the given model participant. The closure will be calculated according to worklist rules.

Parameters:
participantID - The ID of the model participant to filter for.

inUserGroup

public static ParticipantAssociationFilter inUserGroup(String groupID)
Deprecated. Superseded by forParticipant(ParticipantInfo)

Constructs a filter criterion matching the user group identified by the given id.

Parameters:
groupID - The ID of the user group to filter for.

forUser

public static ParticipantAssociationFilter forUser(String account)
Deprecated. Superseded by forParticipant(ParticipantInfo)

Constructs a filter criterion matching the user identified by the given account.

Parameters:
account - The account of the user to filter for.

forTeamLeader

public static ParticipantAssociationFilter forTeamLeader(String roleId)
Deprecated. Superseded by forTeamLeader(RoleInfo)

Constructs a filter criterion matching the team leader role identified by the given id.

Parameters:
roleId - The id of the team leader role to filter for.

forParticipant

public static ParticipantAssociationFilter forParticipant(ParticipantInfo participant)
Constructs a filter criterion matching the participant identified by the given ParticipantInfo.

Parameters:
participant - The participant to filter for.

forParticipant

public static ParticipantAssociationFilter forParticipant(ParticipantInfo participant,
                                                          boolean recursively)
Constructs a filter criterion matching the participant identified by the given ParticipantInfo.

Parameters:
participant - The participant to filter for.
recursively - Flag to determine if evaluation of this filter should traverse the participant hierarchy.

forTeamLeader

public static ParticipantAssociationFilter forTeamLeader(RoleInfo role)
Constructs a filter criterion matching the team leader role identified by the given RoleInfo.

Parameters:
role - The team leader role to filter for.

forDepartment

public static ParticipantAssociationFilter forDepartment(DepartmentInfo department)
Constructs a filter criterion matching the department identified by the given DepartmentInfo instance.

Parameters:
department - The department users have to assigned to. May be null which means the default department.

getFilterKind

public ParticipantAssociationFilter.Kind getFilterKind()
Retrieves the ParticipantAssociationFilter.Kind of the filter.

Returns:
The filter kind.

getParticipantID

public String getParticipantID()
Retrieves the ID of the participant to filter for.

Returns:
The participant ID.

getParticipant

public ParticipantInfo getParticipant()
Retrieves the ParticipantInfo to filter for.

Returns:
The participant ID.

isRecursively

public boolean isRecursively()
Retrieves whether this filter will match a participant hierarchy or just a specific participant.

Returns:
true if this filter matches a participant hierarchy, false otherwise.

accept

public Object accept(FilterEvaluationVisitor visitor,
                     Object context)
Description copied from interface: FilterCriterion
Visitor dispatch callback used for evaluating filter criteria. Usually implemented as return visitor.visit(this, context), thus calling the appropriately overloaded visitation method.

Specified by:
accept in interface FilterCriterion
Parameters:
visitor - The visitor performing the evaluation.
context - Information used by the visitor during the visitation process.
Returns:
Visitor specific result of the visitation.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.