Interface PersistencyHandler
public interface PersistencyHandler
A Handler to create, update or delete instances of
MasterEntity
- Since:
- 10.0.28
-
Method Summary
Modifier and TypeMethodDescriptioncreateAccount
(Optional<User> user) Create a newAccount
object.createAgentGroup
(Optional<User> user) Create a newAgentGroup
object.createCategory
(String name, Optional<User> user) Create a newCategory
object.createChatBot
(Optional<User> user) Create a newChatBot
object.createExternalRouting
(String type, Optional<User> user) Create a newExternalRouting
object.createLocation
(Optional<User> user) Create a newLocation
object.createPhoneSystem
(String type, Optional<User> user) Create a newPhoneSystem
object.createRoutingTag
(String name, Optional<User> user) Create a newRoutingTag
object.createSystemGroup
(Optional<User> user) Create a newSystemGroup
object.createTenant
(Optional<User> user) Create a newTenant
object.createTextModule
(Optional<User> user) Create a newTextModule
object.Create a newTextModuleFirstLevelGroup
object.Create a newTextModuleSecondLevelGroup
object.createTransactionCode
(Optional<User> user) Create a newTransactionCode
object.createUser
(Optional<User> user) Create a newUser
object.getAccountModifier
(Account account, Optional<User> user) Build aAccountModifier
for the passedAccount
object.getAgentGroupModifier
(AgentGroup agentGroup, Optional<User> user) Build anAgentGroupModifier
for the passedAgentGroup
object.getCategoryModifier
(Category category, Optional<User> user) Build aCategoryModifier
for the passedCategory
object.getChatBotModifier
(ChatBot chatBot, Optional<User> user) Build aChatBotModifier
for the passedChatBot
object.getExternalRoutingModifier
(ExternalRouting externalRouting, Optional<User> user) Build aExternalRoutingModifier
for the passedExternalRouting
object.getLocationModifier
(Location location, Optional<User> user) Build aLocationModifier
for the passedLocation
object.getPhoneSystemModifier
(PhoneSystem phoneSystem, Optional<User> user) Build aPhoneSystemModifier
for the passedPhoneSystem
object.getSystemGroupModifier
(SystemGroup systemGroup, Optional<User> user) Build anSystemGroupModifier
for the passedSystemGroup
object.getTenantModifier
(Tenant tenant, Optional<User> user) Build aTenantModifier
for the passedTenant
object.getTextModuleFirstLevelGroupModifier
(TextModuleFirstLevelGroup textModuleFirstLevelGroup, Optional<User> user) Build anTextModuleFirstLevelGroupModifier
for the passedTextModuleFirstLevelGroup
object.getTextModuleModifier
(TextModule textModule, Optional<User> user) Build anTextModuleModifier
for the passedTextModule
object.Build anTextModuleRootModifier
for theTextModuleRoot
object.getTextModuleSecondLevelGroupModifier
(TextModuleSecondLevelGroup textModuleSecondLevelGroup, Optional<User> user) Build anTextModuleSecondLevelGroupModifier
for the passedTextModuleSecondLevelGroup
object.getTransactionCodeModifier
(TransactionCode transactionCode, Optional<User> user) Build aTransactionCodeModifier
for the passedTransactionCode
object.getUserModifier
(User userToEdit, Optional<User> user) Build anUserModifier
for the passedUser
object.
-
Method Details
-
createTenant
Create a newTenant
object. TheTenant
is persisted after calling thewrite
method of the returnedTenantModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TenantModifier
associated with the newTenant
. - Since:
- 10.0.28
-
getTenantModifier
Build aTenantModifier
for the passedTenant
object.- Parameters:
tenant
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TenantModifier
associated with theTenant
. - Since:
- 10.0.28
-
createLocation
Create a newLocation
object. TheLocation
is persisted after calling thewrite
method of the returnedLocationModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
LocationModifier
associated with the newLocation
. - Since:
- 10.0.34
-
getLocationModifier
Build aLocationModifier
for the passedLocation
object.- Parameters:
location
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
LocationModifier
associated with theLocation
. - Since:
- 10.0.34
-
createCategory
Create a newCategory
object. TheCategory
is persisted after calling thewrite
method of the returnedCategoryModifier
.- Parameters:
name
- the name of the new categoryuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
CategoryModifier
associated with the newCategory
. - Throws:
ValidationException
- if the name is invalid- Since:
- 10.0.50
-
getCategoryModifier
Build aCategoryModifier
for the passedCategory
object.- Parameters:
category
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
CategoryModifier
associated with theCategory
. - Since:
- 10.0.50
-
createTransactionCode
Create a newTransactionCode
object. TheTransactionCode
is persisted after calling thewrite
method of the returnedTransactionCodeModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TransactionCodeModifier
associated with the newTransactionCode
. - Since:
- 10.0.38
-
getTransactionCodeModifier
TransactionCodeModifier getTransactionCodeModifier(TransactionCode transactionCode, Optional<User> user) Build aTransactionCodeModifier
for the passedTransactionCode
object.- Parameters:
transactionCode
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TransactionCodeModifier
associated with theTransactionCode
. - Since:
- 10.0.38
-
createAccount
Create a newAccount
object. TheAccount
is persisted after calling thewrite
method of the returnedAccountModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
AccountModifier
associated with the newAccount
.
-
getAccountModifier
Build aAccountModifier
for the passedAccount
object.- Parameters:
account
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
AccountModifier
associated with theAccount
.
-
createAgentGroup
Create a newAgentGroup
object. TheAgentGroup
is persisted after calling thewrite
method of the returnedAgentGroupModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
AgentGroupModifier
associated with the newAgentGroup
. - Since:
- 10.0.108
-
getAgentGroupModifier
Build anAgentGroupModifier
for the passedAgentGroup
object.- Parameters:
agentGroup
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
AgentGroupModifier
associated with theAgentGroup
. - Since:
- 10.0.108
-
createSystemGroup
Create a newSystemGroup
object. TheSystemGroup
is persisted after calling thewrite
method of the returnedSystemGroupModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
SystemGroupModifier
associated with the newSystemGroup
. - Since:
- 10.0.108
-
getSystemGroupModifier
Build anSystemGroupModifier
for the passedSystemGroup
object.- Parameters:
systemGroup
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
SystemGroupModifier
associated with theSystemGroup
. - Since:
- 10.0.108
-
getTextModuleRootModifier
Build anTextModuleRootModifier
for theTextModuleRoot
object.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleRootModifier
associated with theTextModuleRoot
. - Since:
- 10.0.206
-
createTextModuleFirstLevelGroup
Create a newTextModuleFirstLevelGroup
object. TheTextModuleFirstLevelGroup
is persisted after calling thewrite
method of the returnedTextModuleFirstLevelGroupModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleFirstLevelGroupModifier
associated with thenewTextModuleFirstLevelGroup
. - Since:
- 10.0.206
-
getTextModuleFirstLevelGroupModifier
TextModuleFirstLevelGroupModifier getTextModuleFirstLevelGroupModifier(TextModuleFirstLevelGroup textModuleFirstLevelGroup, Optional<User> user) Build anTextModuleFirstLevelGroupModifier
for the passedTextModuleFirstLevelGroup
object.- Parameters:
textModuleFirstLevelGroup
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleFirstLevelGroupModifier
associated with theTextModuleFirstLevelGroup
. - Since:
- 10.0.206
-
createTextModuleSecondLevelGroup
Create a newTextModuleSecondLevelGroup
object. TheTextModuleSecondLevelGroup
is persisted after calling thewrite
method of the returnedTextModuleSecondLevelGroupModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleSecondLevelGroupModifier
associated with thenewTextModuleSecondLevelGroup
. - Since:
- 10.0.206
-
getTextModuleSecondLevelGroupModifier
TextModuleSecondLevelGroupModifier getTextModuleSecondLevelGroupModifier(TextModuleSecondLevelGroup textModuleSecondLevelGroup, Optional<User> user) Build anTextModuleSecondLevelGroupModifier
for the passedTextModuleSecondLevelGroup
object.- Parameters:
textModuleSecondLevelGroup
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleSecondLevelGroupModifier
associated with theTextModuleSecondLevelGroup
. - Since:
- 10.0.206
-
createTextModule
Create a newTextModule
object. TheTextModule
is persisted after calling thewrite
method of the returnedTextModuleModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleModifier
associated with thenewTextModule
. - Since:
- 10.0.206
-
getTextModuleModifier
Build anTextModuleModifier
for the passedTextModule
object.- Parameters:
textModule
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
TextModuleModifier
associated with theTextModule
. - Since:
- 10.0.206
-
createUser
Create a newUser
object. TheUser
is persisted after calling thewrite
method of the returnedUserModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
UserModifier
associated with the newUser
. - Since:
- 11.2
-
getUserModifier
Build anUserModifier
for the passedUser
object.- Parameters:
userToEdit
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
UserModifier
associated with theUser
. - Since:
- 11.2
-
createPhoneSystem
Create a newPhoneSystem
object. ThePhoneSystem
is persisted after calling theModifier.write()
method of the returnedPhoneSystemModifier
.- Parameters:
type
- the type is the unmodifiable and unique name of the client plugin implementation defined by thePhoneSystemConnectorPlugin
annotation of the client class. The client class must be annotated withPhoneSystemConnectorPlugin
and implements one or more interfaces extending the interfacePhoneSystemConnector
.user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
PhoneSystemModifier
associated with the newPhoneSystem
. - Throws:
ValidationException
- if the type is invalid or the plugin class unavailable.- Since:
- 11.27
-
getPhoneSystemModifier
Build aPhoneSystemModifier
for the passedPhoneSystem
object.- Parameters:
phoneSystem
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
PhoneSystemModifier
associated with thePhoneSystem
. - Since:
- 11.27
-
createExternalRouting
ExternalRoutingModifier createExternalRouting(String type, Optional<User> user) throws ValidationException Create a newExternalRouting
object. TheExternalRouting
is persisted after calling theModifier.write()
method of the returnedExternalRoutingModifier
.- Parameters:
type
- the type is the unmodifiable and unique name of the client plugin implementation defined by theExternalRoutingConnectorPlugin
annotation of the client class. The client class must be annotated withExternalRoutingConnectorPlugin
and implements the interfaceExternalRoutingConnector
.user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ExternalRoutingModifier
associated with the newExternalRouting
. - Throws:
ValidationException
- if the type is invalid or the plugin class unavailable.- Since:
- 11.29
-
getExternalRoutingModifier
ExternalRoutingModifier getExternalRoutingModifier(ExternalRouting externalRouting, Optional<User> user) Build aExternalRoutingModifier
for the passedExternalRouting
object.- Parameters:
externalRouting
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ExternalRoutingModifier
associated with theExternalRouting
. - Since:
- 11.29
-
createRoutingTag
Create a newRoutingTag
object. TheRoutingTag
is persisted after calling thewrite
method of the returnedRoutingTagModifier
.- Parameters:
name
- the unique name of the RoutingTag to be created. The name cannot be changed after the RoutingTag has been created.user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
RoutingTagModifier
associated with the newRoutingTag
. - Throws:
ValidationException
- if the given name is invalid.- Since:
- 12.3
-
createChatBot
Create a newChatBot
object. TheChatBot
is persisted after calling theModifier.write()
method of the returnedChatBotModifier
.- Parameters:
user
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ChatBotModifier
associated with the newChatBot
. - Since:
- 12.21
-
getChatBotModifier
Build aChatBotModifier
for the passedChatBot
object.- Parameters:
chatBot
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ChatBotModifier
associated with theChatBot
. - Since:
- 12.21
-