Class ConversationUserQueryImpl
- java.lang.Object
-
- com.flowable.engage.engine.impl.conversation.ConversationUserQueryImpl
-
- All Implemented Interfaces:
ConversationUserQuery
,Command<List<String>>
public class ConversationUserQueryImpl extends Object implements ConversationUserQuery, Command<List<String>>
The implementation of theConversationUserQuery
interface used to query for users involved in a conversation.- Author:
- Micha Kiener
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
addAssignedGroupMembers
protected boolean
addAssignedUsers
protected boolean
addCandidateGroupMembers
protected boolean
addParticipantUsers
protected CommandExecutor
commandExecutor
protected String
conversationId
protected boolean
includeHistoricParticipants
-
Constructor Summary
Constructors Constructor Description ConversationUserQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversationUserQuery
addAll()
This will return all users involved within a conversation, including directly assigned participants, owners and assignees as well as indirectly involved users through group memberships.ConversationUserQuery
addAssignedGroupMembers()
Includes all group members of the assigned group of the conversation.ConversationUserQuery
addAssignedUsers()
Includes all directly assigned users (e.g.ConversationUserQuery
addCandidateGroupMembers()
Includes all group members of all candidate groups of the conversation.ConversationUserQuery
addParticipantUsers()
Includes all participants of the conversation.protected void
checkQuery()
ConversationUserQuery
conversationId(String conversationId)
The id of the conversation to request users for must be provided through its id.long
count()
Counts the number of user ids according the query.List<String>
execute(CommandContext commandContext)
protected CommandExecutor
getCommandExecutor()
ConversationUserQuery
includeHistoricParticipants()
Includes participants that are not part of the current conversation, but have been part in the past.List<String>
list()
Returns the list of user ids according the query.protected Collection<String>
resolveGroupMembers(String groupId, CommandContext commandContext)
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
conversationId
protected String conversationId
-
addAssignedUsers
protected boolean addAssignedUsers
-
addParticipantUsers
protected boolean addParticipantUsers
-
addAssignedGroupMembers
protected boolean addAssignedGroupMembers
-
addCandidateGroupMembers
protected boolean addCandidateGroupMembers
-
includeHistoricParticipants
protected boolean includeHistoricParticipants
-
-
Constructor Detail
-
ConversationUserQueryImpl
public ConversationUserQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
conversationId
public ConversationUserQuery conversationId(String conversationId)
Description copied from interface:ConversationUserQuery
The id of the conversation to request users for must be provided through its id.- Specified by:
conversationId
in interfaceConversationUserQuery
- Parameters:
conversationId
- the id of the conversation to request users for- Returns:
- the query builder for chaining
-
addAll
public ConversationUserQuery addAll()
Description copied from interface:ConversationUserQuery
This will return all users involved within a conversation, including directly assigned participants, owners and assignees as well as indirectly involved users through group memberships.- Specified by:
addAll
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
addAssignedUsers
public ConversationUserQuery addAssignedUsers()
Description copied from interface:ConversationUserQuery
Includes all directly assigned users (e.g. owner and assignee) of the conversation.- Specified by:
addAssignedUsers
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
addParticipantUsers
public ConversationUserQuery addParticipantUsers()
Description copied from interface:ConversationUserQuery
Includes all participants of the conversation.- Specified by:
addParticipantUsers
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
addAssignedGroupMembers
public ConversationUserQuery addAssignedGroupMembers()
Description copied from interface:ConversationUserQuery
Includes all group members of the assigned group of the conversation.- Specified by:
addAssignedGroupMembers
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
addCandidateGroupMembers
public ConversationUserQuery addCandidateGroupMembers()
Description copied from interface:ConversationUserQuery
Includes all group members of all candidate groups of the conversation.- Specified by:
addCandidateGroupMembers
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
includeHistoricParticipants
public ConversationUserQuery includeHistoricParticipants()
Description copied from interface:ConversationUserQuery
Includes participants that are not part of the current conversation, but have been part in the past.- Specified by:
includeHistoricParticipants
in interfaceConversationUserQuery
- Returns:
- the query builder for chaining
-
checkQuery
protected void checkQuery()
-
execute
public List<String> execute(CommandContext commandContext)
-
count
public long count()
Description copied from interface:ConversationUserQuery
Counts the number of user ids according the query.- Specified by:
count
in interfaceConversationUserQuery
- Returns:
- the total user count
-
list
public List<String> list()
Description copied from interface:ConversationUserQuery
Returns the list of user ids according the query.- Specified by:
list
in interfaceConversationUserQuery
- Returns:
- the list of user ids
-
resolveGroupMembers
protected Collection<String> resolveGroupMembers(String groupId, CommandContext commandContext)
-
getCommandExecutor
protected CommandExecutor getCommandExecutor()
-
-