Package com.flowable.idm.engine.impl
Class UserAccountBuilderImpl
- java.lang.Object
-
- com.flowable.idm.engine.impl.UserAccountBuilderImpl
-
- All Implemented Interfaces:
UserAccountBuilder
public class UserAccountBuilderImpl extends Object implements UserAccountBuilder
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected String
accountId
protected String
businessAccountId
protected String
externalUserId
protected CoreIdmEngineConfiguration
idmEngineConfiguration
protected Set<String>
modifiedProperties
protected String
name
protected String
state
protected String
subState
protected String
subType
protected String
tenantId
protected String
type
protected String
userAccountDefinitionId
protected String
userAccountDefinitionKey
protected String
userId
-
Constructor Summary
Constructors Constructor Description UserAccountBuilderImpl(CoreIdmEngineConfiguration idmEngineConfiguration, String accountId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserAccountBuilder
businessAccountId(String businessAccountId)
The id of the business account that the user account would be linked to (e.g.UserAccountBuilder
externalUserId(String externalUserId)
The id of the user within the external system (e.g.String
getBusinessAccountId()
String
getExternalUserId()
String
getName()
String
getState()
String
getSubState()
String
getSubType()
String
getTenantId()
String
getType()
String
getUserAccountDefinitionId()
String
getUserAccountDefinitionKey()
String
getUserId()
boolean
isPropertyModified(String property)
UserAccountBuilder
name(String name)
The name of the account (e.g.UserAccount
save()
Performs the save of the user accountUserAccountBuilder
state(String state)
The initial state of the created account.UserAccountBuilder
subState(String subState)
The initial sub state of the created account.UserAccountBuilder
subType(String subType)
The sub type of the account.UserAccountBuilder
tenantId(String tenantId)
The id of the tenant that this account belongs toUserAccountBuilder
type(String type)
Set the type of the account.UserAccountBuilder
userAccountDefinitionId(String userAccountDefinitionId)
The id of theUserAccountDefinition
that should be used when creating the user account.UserAccountBuilder
userAccountDefinitionKey(String userAccountDefinitionKey)
The key of theUserAccountDefinition
that should be used when creating the user account.UserAccountBuilder
userId(String userId)
The id of the user that this account belongs to
-
-
-
Field Detail
-
idmEngineConfiguration
protected final CoreIdmEngineConfiguration idmEngineConfiguration
-
accountId
protected final String accountId
-
userId
protected String userId
-
tenantId
protected String tenantId
-
name
protected String name
-
type
protected String type
-
subType
protected String subType
-
state
protected String state
-
subState
protected String subState
-
businessAccountId
protected String businessAccountId
-
externalUserId
protected String externalUserId
-
userAccountDefinitionId
protected String userAccountDefinitionId
-
userAccountDefinitionKey
protected String userAccountDefinitionKey
-
-
Constructor Detail
-
UserAccountBuilderImpl
public UserAccountBuilderImpl(CoreIdmEngineConfiguration idmEngineConfiguration, String accountId)
-
-
Method Detail
-
userId
public UserAccountBuilder userId(String userId)
Description copied from interface:UserAccountBuilder
The id of the user that this account belongs to- Specified by:
userId
in interfaceUserAccountBuilder
- Parameters:
userId
- the user id linked with the account
-
tenantId
public UserAccountBuilder tenantId(String tenantId)
Description copied from interface:UserAccountBuilder
The id of the tenant that this account belongs to- Specified by:
tenantId
in interfaceUserAccountBuilder
- Parameters:
tenantId
- the tenant id for the account
-
name
public UserAccountBuilder name(String name)
Description copied from interface:UserAccountBuilder
The name of the account (e.g. WhatsApp for XY, etc)- Specified by:
name
in interfaceUserAccountBuilder
- Parameters:
name
- the name for the account
-
type
public UserAccountBuilder type(String type)
Description copied from interface:UserAccountBuilder
Set the type of the account. (e.g. Messenger)- Specified by:
type
in interfaceUserAccountBuilder
- Parameters:
type
- the type of the account- See Also:
for known types
-
subType
public UserAccountBuilder subType(String subType)
Description copied from interface:UserAccountBuilder
The sub type of the account. (e.g. WhatsApp, WeChat, Facebook, etc)- Specified by:
subType
in interfaceUserAccountBuilder
- Parameters:
subType
- the sub type of the account- See Also:
for known sub types
-
state
public UserAccountBuilder state(String state)
Description copied from interface:UserAccountBuilder
The initial state of the created account. In order to update the state of the account theUserAccountService.setStateAndSubState(String, String, String)
should be used.- Specified by:
state
in interfaceUserAccountBuilder
- Parameters:
state
- the initial state for the created account
-
subState
public UserAccountBuilder subState(String subState)
Description copied from interface:UserAccountBuilder
The initial sub state of the created account. In order to update the state of the account theUserAccountService.setStateAndSubState(String, String, String)
should be used.- Specified by:
subState
in interfaceUserAccountBuilder
- Parameters:
subState
- the initial state for the created account
-
businessAccountId
public UserAccountBuilder businessAccountId(String businessAccountId)
Description copied from interface:UserAccountBuilder
The id of the business account that the user account would be linked to (e.g. WhatsApp business number xyz or WeChat official account, etc)- Specified by:
businessAccountId
in interfaceUserAccountBuilder
- Parameters:
businessAccountId
- the id of the business account
-
externalUserId
public UserAccountBuilder externalUserId(String externalUserId)
Description copied from interface:UserAccountBuilder
The id of the user within the external system (e.g. the phone number for WhatsApp, the user-id for Facebook account, etc)- Specified by:
externalUserId
in interfaceUserAccountBuilder
- Parameters:
externalUserId
- the id of the external user
-
userAccountDefinitionId
public UserAccountBuilder userAccountDefinitionId(String userAccountDefinitionId)
Description copied from interface:UserAccountBuilder
The id of theUserAccountDefinition
that should be used when creating the user account.- Specified by:
userAccountDefinitionId
in interfaceUserAccountBuilder
- Parameters:
userAccountDefinitionId
- the id of the user account definition
-
userAccountDefinitionKey
public UserAccountBuilder userAccountDefinitionKey(String userAccountDefinitionKey)
Description copied from interface:UserAccountBuilder
The key of theUserAccountDefinition
that should be used when creating the user account.- Specified by:
userAccountDefinitionKey
in interfaceUserAccountBuilder
- Parameters:
userAccountDefinitionKey
- the key of the user account definition
-
save
public UserAccount save()
Description copied from interface:UserAccountBuilder
Performs the save of the user account- Specified by:
save
in interfaceUserAccountBuilder
- Returns:
- the saved
UserAccount
-
isPropertyModified
public boolean isPropertyModified(String property)
-
getUserId
public String getUserId()
-
getTenantId
public String getTenantId()
-
getName
public String getName()
-
getType
public String getType()
-
getSubType
public String getSubType()
-
getState
public String getState()
-
getSubState
public String getSubState()
-
getBusinessAccountId
public String getBusinessAccountId()
-
getExternalUserId
public String getExternalUserId()
-
getUserAccountDefinitionId
public String getUserAccountDefinitionId()
-
getUserAccountDefinitionKey
public String getUserAccountDefinitionKey()
-
-