public class ConversationBuilderImpl extends Object implements ConversationBuilder
Modifier and Type | Class and Description |
---|---|
protected static class |
ConversationBuilderImpl.StartConversationWithChecksCmd<T> |
Modifier and Type | Field and Description |
---|---|
protected String |
assignedGroupId |
protected String |
assigneeId |
protected String |
avatarId |
protected Set<String> |
candidateGroups |
protected String |
conversationDefinitionId |
protected String |
conversationDefinitionKey |
protected ConversationServiceImpl |
conversationService |
protected String |
description |
protected EngageEngineConfiguration |
engageEngineConfiguration |
protected String |
externalId |
protected String |
fallbackName |
protected String |
joiningType |
protected String |
name |
protected String |
ownerId |
protected String |
parentId |
protected Set<String> |
participants |
protected String |
permissionType |
protected String |
referenceDefinitionId |
protected String |
referenceId |
protected String |
referenceType |
protected String |
subType |
protected List<String> |
tags |
protected String |
tenantId |
protected String |
type |
Constructor and Description |
---|
ConversationBuilderImpl(ConversationServiceImpl conversationService,
EngageEngineConfiguration engageEngineConfiguration) |
Modifier and Type | Method and Description |
---|---|
ConversationBuilder |
addCandidateGroup(String candidateGroup) |
ConversationBuilder |
addParticipant(String participant) |
ConversationBuilder |
addTag(String tag) |
ConversationBuilder |
assignedGroupId(String assignedGroupId) |
ConversationBuilder |
assigneeId(String assigneeId) |
ConversationBuilder |
avatarId(String avatarId)
Optionally set the avatar information for this conversation.
|
ConversationBuilder |
candidateGroups(Set<String> candidateGroups) |
ConversationBuilder |
conversationDefinitionId(String conversationDefinitionId)
Set the id of the conversation definition.
|
ConversationBuilder |
conversationDefinitionKey(String conversationDefinitionKey)
Set the key of the conversation definition.
|
ConversationBuilder |
description(String description)
Set the optional description describing the reason or goal of the conversation in more details than the name.
|
String |
determineTenantId(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) |
protected void |
enrichWithConversationDefinition() |
protected void |
enrichWithConversationDefinition(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) |
ConversationBuilder |
externalId(String externalId)
Set the external id of the conversation.
|
ConversationBuilder |
fallbackName(String fallbackName)
Set the optional fallback name to be used, if there is no explicit name being set (e.g.
|
String |
getAssignedGroupId() |
String |
getAssigneeId() |
String |
getAvatarId() |
Set<String> |
getCandidateGroups() |
String |
getConversationDefinitionId() |
String |
getConversationDefinitionKey()
Returns the key that will be used to do the conversation definition lookup when creating the conversation.
|
String |
getDescription() |
String |
getExternalId() |
String |
getFallbackName()
Optional name to display when there's no title.
|
String |
getJoiningType() |
String |
getName() |
String |
getOwnerId() |
String |
getParentId() |
Set<String> |
getParticipants() |
String |
getPermissionType() |
String |
getReferenceDefinitionId() |
String |
getReferenceId() |
String |
getReferenceType() |
String |
getSubType() |
List<String> |
getTags()
Returns the optional list of tags for this object.
|
String |
getTenantId() |
String |
getType() |
ConversationBuilder |
joiningType(String joiningType)
Set the joining type used for this conversation.
|
ConversationBuilder |
name(String name)
Set the optional name for this conversation.
|
ConversationBuilder |
ownerId(String ownerId) |
ConversationBuilder |
parentId(String parentId)
Set the id of the parent conversation, if this is a child conversation (e.g.
|
ConversationBuilder |
participants(Set<String> participants) |
ConversationBuilder |
permissionType(String permissionType)
Set the permission type to be used for this conversation.
|
ConversationBuilder |
referenceDefinitionId(String referenceDefinitionId)
Set the reference definition id of the conversation pointing to for example a case or process definition id.
|
ConversationBuilder |
referenceId(String referenceId)
Set the reference id of the conversation pointing to for example a case or process instance id.
|
ConversationBuilder |
referenceType(String referenceType)
Set the reference type of the conversation pointing to for example a case or process instance type.
|
Conversation |
start()
Returns the newly created conversation object.
|
Conversation |
startWithPermissionCheck(String userId)
Deprecated.
|
Conversation |
startWithPermissionCheck(String userId,
Collection<String> userGroupKeys,
String userTenantId)
Same as
ConversationBuilder.start() with an additional permission check that the user with userId is allowed to create the conversation. |
ConversationHolder |
startWithReuse()
Tries to find a similar conversation, if found it would return that one.
|
ConversationHolder |
startWithReuseAndPermissionCheck(String userId)
Deprecated.
|
ConversationHolder |
startWithReuseAndPermissionCheck(String userId,
Collection<String> userGroupKeys,
String userTenantId)
Same as
ConversationBuilder.startWithReuse() with an additional permission check that the user with userId is allowed to create the conversation. |
ConversationBuilder |
subType(String subType)
Set the sub type of this conversation.
|
ConversationBuilder |
tags(Collection<String> tags) |
ConversationBuilder |
tenantId(String tenantId)
Optionally sets the tenantId for this conversation.
|
ConversationBuilder |
type(String type)
Set the type for this conversation which has an impact on how participants might be joined, on permissions or other behaviors of the conversation.
|
protected final ConversationServiceImpl conversationService
protected final EngageEngineConfiguration engageEngineConfiguration
protected String externalId
protected String parentId
protected String type
protected String subType
protected String permissionType
protected String joiningType
protected String name
protected String fallbackName
protected String conversationDefinitionId
protected String conversationDefinitionKey
protected String description
protected String referenceId
protected String referenceType
protected String referenceDefinitionId
protected String avatarId
protected String ownerId
protected String assigneeId
protected String assignedGroupId
protected String tenantId
public ConversationBuilderImpl(ConversationServiceImpl conversationService, EngageEngineConfiguration engageEngineConfiguration)
public String getExternalId()
getExternalId
in interface ConversationBuilder
Conversation.getExternalId()
public ConversationBuilder externalId(String externalId)
ConversationBuilder
externalId
in interface ConversationBuilder
externalId
- the external id for the conversationpublic String getParentId()
getParentId
in interface ConversationBuilder
Conversation.getParentId()
public ConversationBuilder parentId(String parentId)
ConversationBuilder
parentId
in interface ConversationBuilder
parentId
- the id of the parent conversationpublic String getType()
getType
in interface ConversationBuilder
Conversation.getType()
public ConversationBuilder subType(String subType)
ConversationBuilder
subType
in interface ConversationBuilder
subType
- the sub type of the conversationpublic String getSubType()
getSubType
in interface ConversationBuilder
Conversation.getSubType()
public ConversationBuilder type(String type)
ConversationBuilder
ConversationBuilder.joiningType(String)
and ConversationBuilder.permissionType(String)
of it as well. The
type is a mandatory field and must be set explicitly using this method. As the joining and permission types are evaluated according the type
within this method, make sure to explicitly set them (if necessary) AFTER setting the sub type, otherwise they will be overwritten with defaults.type
in interface ConversationBuilder
type
- the sub type to set for this conversationConversation.getType()
,
ConversationTypes
public String getPermissionType()
getPermissionType
in interface ConversationBuilder
Conversation.getPermissionType()
public ConversationBuilder permissionType(String permissionType)
ConversationBuilder
ConversationBuilder.type(String)
, make sure to set it explicitly using this method AFTER the type is set!permissionType
in interface ConversationBuilder
permissionType
- the permission type to be set for the conversationConversation.getPermissionType()
,
PermissionTypes
public String getJoiningType()
getJoiningType
in interface ConversationBuilder
Conversation.getJoiningType()
public ConversationBuilder joiningType(String joiningType)
ConversationBuilder
ConversationBuilder.type(String)
, make sure to set it explicitly using this method AFTER the type is set!joiningType
in interface ConversationBuilder
joiningType
- the joining type to be set for this conversationConversation.getJoiningType()
,
JoiningTypes
public String getName()
getName
in interface ConversationBuilder
Conversation.getName()
public ConversationBuilder name(String name)
ConversationBuilder
name
in interface ConversationBuilder
name
- the name for the created conversationpublic String getFallbackName()
ConversationBuilder
getFallbackName
in interface ConversationBuilder
public ConversationBuilder fallbackName(String fallbackName)
ConversationBuilder
fallbackName
in interface ConversationBuilder
fallbackName
- the optional fallback name for the conversationConversation.getFallbackName()
public String getConversationDefinitionId()
getConversationDefinitionId
in interface ConversationBuilder
Conversation.getConversationDefinitionId()
public String getConversationDefinitionKey()
ConversationBuilder
getConversationDefinitionKey
in interface ConversationBuilder
public ConversationBuilder conversationDefinitionId(String conversationDefinitionId)
ConversationBuilder
conversationDefinitionId
in interface ConversationBuilder
conversationDefinitionId
- the id of the conversation definitionpublic ConversationBuilder conversationDefinitionKey(String conversationDefinitionKey)
ConversationBuilder
conversationDefinitionKey
in interface ConversationBuilder
conversationDefinitionKey
- The key that will be used to find the latest version of the conversation definition.public String getDescription()
getDescription
in interface ConversationBuilder
Conversation.getDescription()
public ConversationBuilder description(String description)
ConversationBuilder
description
in interface ConversationBuilder
description
- the description for the conversationpublic ConversationBuilder referenceId(String referenceId)
ConversationBuilder
referenceId
in interface ConversationBuilder
referenceId
- The reference id pointing to for example a case or process instance id.public String getReferenceId()
getReferenceId
in interface ConversationBuilder
public ConversationBuilder referenceType(String referenceType)
ConversationBuilder
referenceType
in interface ConversationBuilder
referenceType
- The reference id pointing to for example a case or process instance type.public String getReferenceType()
getReferenceType
in interface ConversationBuilder
public ConversationBuilder referenceDefinitionId(String referenceDefinitionId)
ConversationBuilder
referenceDefinitionId
in interface ConversationBuilder
referenceDefinitionId
- The reference definition id pointing to for example a case or process definition id.public String getReferenceDefinitionId()
getReferenceDefinitionId
in interface ConversationBuilder
public String getAvatarId()
getAvatarId
in interface ConversationBuilder
Conversation.getAvatarId()
public ConversationBuilder avatarId(String avatarId)
ConversationBuilder
avatarId
in interface ConversationBuilder
avatarId
- the optional information for the avatar of this conversationpublic String getOwnerId()
getOwnerId
in interface ConversationBuilder
public ConversationBuilder ownerId(String ownerId)
ownerId
in interface ConversationBuilder
public String getAssigneeId()
getAssigneeId
in interface ConversationBuilder
public ConversationBuilder assigneeId(String assigneeId)
assigneeId
in interface ConversationBuilder
public String getAssignedGroupId()
getAssignedGroupId
in interface ConversationBuilder
public ConversationBuilder assignedGroupId(String assignedGroupId)
assignedGroupId
in interface ConversationBuilder
public Set<String> getParticipants()
getParticipants
in interface ConversationBuilder
public ConversationBuilder participants(Set<String> participants)
participants
in interface ConversationBuilder
public ConversationBuilder addParticipant(String participant)
addParticipant
in interface ConversationBuilder
public Set<String> getCandidateGroups()
getCandidateGroups
in interface ConversationBuilder
public ConversationBuilder candidateGroups(Set<String> candidateGroups)
candidateGroups
in interface ConversationBuilder
public ConversationBuilder addCandidateGroup(String candidateGroup)
addCandidateGroup
in interface ConversationBuilder
public List<String> getTags()
Taggable
public ConversationBuilder tags(Collection<String> tags)
tags
in interface ConversationBuilder
public ConversationBuilder addTag(String tag)
addTag
in interface ConversationBuilder
public ConversationBuilder tenantId(String tenantId)
ConversationBuilder
tenantId
in interface ConversationBuilder
public String getTenantId()
getTenantId
in interface ConversationBuilder
public String determineTenantId(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
public Conversation start()
ConversationBuilder
start
in interface ConversationBuilder
@Deprecated public Conversation startWithPermissionCheck(String userId)
ConversationBuilder
ConversationBuilder.start()
with an additional permission check that the user with userId
is allowed to create the conversation.startWithPermissionCheck
in interface ConversationBuilder
userId
- the id of the user that is creating the conversationConversationBuilder.start()
public Conversation startWithPermissionCheck(String userId, Collection<String> userGroupKeys, String userTenantId)
ConversationBuilder
ConversationBuilder.start()
with an additional permission check that the user with userId
is allowed to create the conversation.startWithPermissionCheck
in interface ConversationBuilder
userId
- the id of the user that is creating the conversationuserGroupKeys
- the group keys of the user that is creating the conversationuserTenantId
- the tenant id of the user that is creating the conversationConversationBuilder.start()
public ConversationHolder startWithReuse()
ConversationBuilder
startWithReuse
in interface ConversationBuilder
@Deprecated public ConversationHolder startWithReuseAndPermissionCheck(String userId)
ConversationBuilder
ConversationBuilder.startWithReuse()
with an additional permission check that the user with userId
is allowed to create the conversation.startWithReuseAndPermissionCheck
in interface ConversationBuilder
userId
- the id of the user that is creating the conversationpublic ConversationHolder startWithReuseAndPermissionCheck(String userId, Collection<String> userGroupKeys, String userTenantId)
ConversationBuilder
ConversationBuilder.startWithReuse()
with an additional permission check that the user with userId
is allowed to create the conversation.startWithReuseAndPermissionCheck
in interface ConversationBuilder
userId
- the id of the user that is creating the conversationuserGroupKeys
- the group keys of the user that is creating the conversationuserTenantId
- the tenant id of the user that is creating the conversationprotected void enrichWithConversationDefinition()
protected void enrichWithConversationDefinition(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
Copyright © 2019. All rights reserved.