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)
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)
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 ConversationBuilderConversation.getExternalId()public ConversationBuilder externalId(String externalId)
ConversationBuilderexternalId in interface ConversationBuilderexternalId - the external id for the conversationpublic String getParentId()
getParentId in interface ConversationBuilderConversation.getParentId()public ConversationBuilder parentId(String parentId)
ConversationBuilderparentId in interface ConversationBuilderparentId - the id of the parent conversationpublic String getType()
getType in interface ConversationBuilderConversation.getType()public ConversationBuilder subType(String subType)
ConversationBuildersubType in interface ConversationBuildersubType - the sub type of the conversationpublic String getSubType()
getSubType in interface ConversationBuilderConversation.getSubType()public ConversationBuilder type(String type)
ConversationBuilderConversationBuilder.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 ConversationBuildertype - the sub type to set for this conversationConversation.getType(),
ConversationTypespublic String getPermissionType()
getPermissionType in interface ConversationBuilderConversation.getPermissionType()public ConversationBuilder permissionType(String permissionType)
ConversationBuilderConversationBuilder.type(String), make sure to set it explicitly using this method AFTER the type is set!permissionType in interface ConversationBuilderpermissionType - the permission type to be set for the conversationConversation.getPermissionType(),
PermissionTypespublic String getJoiningType()
getJoiningType in interface ConversationBuilderConversation.getJoiningType()public ConversationBuilder joiningType(String joiningType)
ConversationBuilderConversationBuilder.type(String), make sure to set it explicitly using this method AFTER the type is set!joiningType in interface ConversationBuilderjoiningType - the joining type to be set for this conversationConversation.getJoiningType(),
JoiningTypespublic String getName()
getName in interface ConversationBuilderConversation.getName()public ConversationBuilder name(String name)
ConversationBuildername in interface ConversationBuildername - the name for the created conversationpublic String getFallbackName()
ConversationBuildergetFallbackName in interface ConversationBuilderpublic ConversationBuilder fallbackName(String fallbackName)
ConversationBuilderfallbackName in interface ConversationBuilderfallbackName - the optional fallback name for the conversationConversation.getFallbackName()public String getConversationDefinitionId()
getConversationDefinitionId in interface ConversationBuilderConversation.getConversationDefinitionId()public String getConversationDefinitionKey()
ConversationBuildergetConversationDefinitionKey in interface ConversationBuilderpublic ConversationBuilder conversationDefinitionId(String conversationDefinitionId)
ConversationBuilderconversationDefinitionId in interface ConversationBuilderconversationDefinitionId - the id of the conversation definitionpublic ConversationBuilder conversationDefinitionKey(String conversationDefinitionKey)
ConversationBuilderconversationDefinitionKey in interface ConversationBuilderconversationDefinitionKey - The key that will be used to find the latest version of the conversation definition.public String getDescription()
getDescription in interface ConversationBuilderConversation.getDescription()public ConversationBuilder description(String description)
ConversationBuilderdescription in interface ConversationBuilderdescription - the description for the conversationpublic ConversationBuilder referenceId(String referenceId)
ConversationBuilderreferenceId in interface ConversationBuilderreferenceId - The reference id pointing to for example a case or process instance id.public String getReferenceId()
getReferenceId in interface ConversationBuilderpublic ConversationBuilder referenceType(String referenceType)
ConversationBuilderreferenceType in interface ConversationBuilderreferenceType - The reference id pointing to for example a case or process instance type.public String getReferenceType()
getReferenceType in interface ConversationBuilderpublic ConversationBuilder referenceDefinitionId(String referenceDefinitionId)
ConversationBuilderreferenceDefinitionId in interface ConversationBuilderreferenceDefinitionId - The reference definition id pointing to for example a case or process definition id.public String getReferenceDefinitionId()
getReferenceDefinitionId in interface ConversationBuilderpublic String getAvatarId()
getAvatarId in interface ConversationBuilderConversation.getAvatarId()public ConversationBuilder avatarId(String avatarId)
ConversationBuilderavatarId in interface ConversationBuilderavatarId - the optional information for the avatar of this conversationpublic String getOwnerId()
getOwnerId in interface ConversationBuilderpublic ConversationBuilder ownerId(String ownerId)
ownerId in interface ConversationBuilderpublic String getAssigneeId()
getAssigneeId in interface ConversationBuilderpublic ConversationBuilder assigneeId(String assigneeId)
assigneeId in interface ConversationBuilderpublic String getAssignedGroupId()
getAssignedGroupId in interface ConversationBuilderpublic ConversationBuilder assignedGroupId(String assignedGroupId)
assignedGroupId in interface ConversationBuilderpublic Set<String> getParticipants()
getParticipants in interface ConversationBuilderpublic ConversationBuilder participants(Set<String> participants)
participants in interface ConversationBuilderpublic ConversationBuilder addParticipant(String participant)
addParticipant in interface ConversationBuilderpublic Set<String> getCandidateGroups()
getCandidateGroups in interface ConversationBuilderpublic ConversationBuilder candidateGroups(Set<String> candidateGroups)
candidateGroups in interface ConversationBuilderpublic ConversationBuilder addCandidateGroup(String candidateGroup)
addCandidateGroup in interface ConversationBuilderpublic List<String> getTags()
Taggablepublic ConversationBuilder tags(Collection<String> tags)
tags in interface ConversationBuilderpublic ConversationBuilder addTag(String tag)
addTag in interface ConversationBuilderpublic ConversationBuilder tenantId(String tenantId)
ConversationBuildertenantId in interface ConversationBuilderpublic String getTenantId()
getTenantId in interface ConversationBuilderpublic String determineTenantId(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
public Conversation start()
ConversationBuilderstart in interface ConversationBuilderpublic Conversation startWithPermissionCheck(String userId)
ConversationBuilderConversationBuilder.start() with an additional permission check that the user with userId is allowed to create the conversation.startWithPermissionCheck in interface ConversationBuilderuserId - the id of the user that is creating the conversationConversationBuilder.start()public ConversationHolder startWithReuse()
ConversationBuilderstartWithReuse in interface ConversationBuilderpublic ConversationHolder startWithReuseAndPermissionCheck(String userId)
ConversationBuilderConversationBuilder.startWithReuse() with an additional permission check that the user with userId is allowed to create the conversation.startWithReuseAndPermissionCheck in interface ConversationBuilderuserId - the 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.