Interface PersistencyHandler


public interface PersistencyHandler
A Handler to create, update or delete instances of MasterEntity
Since:
10.0.28
  • Method Details

    • createTenant

      TenantModifier createTenant(Optional<User> user)
      Create a new Tenant object. The Tenant is persisted after calling the write method of the returned TenantModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TenantModifier associated with the new Tenant.
      Since:
      10.0.28
    • getTenantModifier

      TenantModifier getTenantModifier(Tenant tenant, Optional<User> user)
      Build a TenantModifier for the passed Tenant object.
      Parameters:
      tenant - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TenantModifier associated with the Tenant.
      Since:
      10.0.28
    • createLocation

      LocationModifier createLocation(Optional<User> user)
      Create a new Location object. The Location is persisted after calling the write method of the returned LocationModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a LocationModifier associated with the new Location.
      Since:
      10.0.34
    • getLocationModifier

      LocationModifier getLocationModifier(Location location, Optional<User> user)
      Build a LocationModifier for the passed Location object.
      Parameters:
      location - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a LocationModifier associated with the Location.
      Since:
      10.0.34
    • createCategory

      CategoryModifier createCategory(String name, Optional<User> user) throws ValidationException
      Create a new Category object. The Category is persisted after calling the write method of the returned CategoryModifier.
      Parameters:
      name - the name of the new category
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a CategoryModifier associated with the new Category.
      Throws:
      ValidationException - if the name is invalid
      Since:
      10.0.50
    • getCategoryModifier

      CategoryModifier getCategoryModifier(Category category, Optional<User> user)
      Build a CategoryModifier for the passed Category object.
      Parameters:
      category - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a CategoryModifier associated with the Category.
      Since:
      10.0.50
    • createTransactionCode

      TransactionCodeModifier createTransactionCode(Optional<User> user)
      Create a new TransactionCode object. The TransactionCode is persisted after calling the write method of the returned TransactionCodeModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TransactionCodeModifier associated with the new TransactionCode.
      Since:
      10.0.38
    • getTransactionCodeModifier

      TransactionCodeModifier getTransactionCodeModifier(TransactionCode transactionCode, Optional<User> user)
      Build a TransactionCodeModifier for the passed TransactionCode object.
      Parameters:
      transactionCode - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TransactionCodeModifier associated with the TransactionCode.
      Since:
      10.0.38
    • createAccount

      AccountModifier createAccount(Optional<User> user)
      Create a new Account object. The Account is persisted after calling the write method of the returned AccountModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a AccountModifier associated with the new Account.
    • getAccountModifier

      AccountModifier getAccountModifier(Account account, Optional<User> user)
      Build a AccountModifier for the passed Account object.
      Parameters:
      account - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a AccountModifier associated with the Account.
    • createAgentGroup

      AgentGroupModifier createAgentGroup(Optional<User> user)
      Create a new AgentGroup object. The AgentGroup is persisted after calling the write method of the returned AgentGroupModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a AgentGroupModifier associated with the new AgentGroup.
      Since:
      10.0.108
    • getAgentGroupModifier

      AgentGroupModifier getAgentGroupModifier(AgentGroup agentGroup, Optional<User> user)
      Build an AgentGroupModifier for the passed AgentGroup object.
      Parameters:
      agentGroup - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a AgentGroupModifier associated with the AgentGroup.
      Since:
      10.0.108
    • createSystemGroup

      SystemGroupModifier createSystemGroup(Optional<User> user)
      Create a new SystemGroup object. The SystemGroup is persisted after calling the write method of the returned SystemGroupModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a SystemGroupModifier associated with the new SystemGroup.
      Since:
      10.0.108
    • getSystemGroupModifier

      SystemGroupModifier getSystemGroupModifier(SystemGroup systemGroup, Optional<User> user)
      Build an SystemGroupModifier for the passed SystemGroup object.
      Parameters:
      systemGroup - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a SystemGroupModifier associated with the SystemGroup.
      Since:
      10.0.108
    • getTextModuleRootModifier

      TextModuleRootModifier getTextModuleRootModifier(Optional<User> user)
      Build an TextModuleRootModifier for the TextModuleRoot object.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleRootModifier associated with the TextModuleRoot.
      Since:
      10.0.206
    • createTextModuleFirstLevelGroup

      TextModuleFirstLevelGroupModifier createTextModuleFirstLevelGroup(Optional<User> user)
      Create a new TextModuleFirstLevelGroup object. The TextModuleFirstLevelGroup is persisted after calling the write method of the returned TextModuleFirstLevelGroupModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleFirstLevelGroupModifier associated with thenew TextModuleFirstLevelGroup.
      Since:
      10.0.206
    • getTextModuleFirstLevelGroupModifier

      TextModuleFirstLevelGroupModifier getTextModuleFirstLevelGroupModifier(TextModuleFirstLevelGroup textModuleFirstLevelGroup, Optional<User> user)
      Build an TextModuleFirstLevelGroupModifier for the passed TextModuleFirstLevelGroup object.
      Parameters:
      textModuleFirstLevelGroup - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleFirstLevelGroupModifier associated with the TextModuleFirstLevelGroup.
      Since:
      10.0.206
    • createTextModuleSecondLevelGroup

      TextModuleSecondLevelGroupModifier createTextModuleSecondLevelGroup(Optional<User> user)
      Create a new TextModuleSecondLevelGroup object. The TextModuleSecondLevelGroup is persisted after calling the write method of the returned TextModuleSecondLevelGroupModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleSecondLevelGroupModifier associated with thenew TextModuleSecondLevelGroup.
      Since:
      10.0.206
    • getTextModuleSecondLevelGroupModifier

      TextModuleSecondLevelGroupModifier getTextModuleSecondLevelGroupModifier(TextModuleSecondLevelGroup textModuleSecondLevelGroup, Optional<User> user)
      Build an TextModuleSecondLevelGroupModifier for the passed TextModuleSecondLevelGroup object.
      Parameters:
      textModuleSecondLevelGroup - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleSecondLevelGroupModifier associated with the TextModuleSecondLevelGroup.
      Since:
      10.0.206
    • createTextModule

      TextModuleModifier createTextModule(Optional<User> user)
      Create a new TextModule object. The TextModule is persisted after calling the write method of the returned TextModuleModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleModifier associated with thenew TextModule.
      Since:
      10.0.206
    • getTextModuleModifier

      TextModuleModifier getTextModuleModifier(TextModule textModule, Optional<User> user)
      Build an TextModuleModifier for the passed TextModule object.
      Parameters:
      textModule - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a TextModuleModifier associated with the TextModule.
      Since:
      10.0.206
    • createUser

      UserModifier createUser(Optional<User> user)
      Create a new User object. The User is persisted after calling the write method of the returned UserModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a UserModifier associated with the new User.
      Since:
      11.2
    • getUserModifier

      UserModifier getUserModifier(User userToEdit, Optional<User> user)
      Build an UserModifier for the passed User object.
      Parameters:
      userToEdit - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a UserModifier associated with the User.
      Since:
      11.2
    • createPhoneSystem

      PhoneSystemModifier createPhoneSystem(String type, Optional<User> user) throws ValidationException
      Create a new PhoneSystem object. The PhoneSystem is persisted after calling the Modifier.write() method of the returned PhoneSystemModifier.
      Parameters:
      type - the type is the unmodifiable and unique name of the client plugin implementation defined by the PhoneSystemConnectorPlugin annotation of the client class. The client class must be annotated with PhoneSystemConnectorPlugin and implements one or more interfaces extending the interface PhoneSystemConnector.
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a PhoneSystemModifier associated with the new PhoneSystem.
      Throws:
      ValidationException - if the type is invalid or the plugin class unavailable.
      Since:
      11.27
    • getPhoneSystemModifier

      PhoneSystemModifier getPhoneSystemModifier(PhoneSystem phoneSystem, Optional<User> user)
      Build a PhoneSystemModifier for the passed PhoneSystem object.
      Parameters:
      phoneSystem - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a PhoneSystemModifier associated with the PhoneSystem.
      Since:
      11.27
    • createExternalRouting

      ExternalRoutingModifier createExternalRouting(String type, Optional<User> user) throws ValidationException
      Create a new ExternalRouting object. The ExternalRouting is persisted after calling the Modifier.write() method of the returned ExternalRoutingModifier.
      Parameters:
      type - the type is the unmodifiable and unique name of the client plugin implementation defined by the ExternalRoutingConnectorPlugin annotation of the client class. The client class must be annotated with ExternalRoutingConnectorPlugin and implements the interface ExternalRoutingConnector.
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a ExternalRoutingModifier associated with the new ExternalRouting.
      Throws:
      ValidationException - if the type is invalid or the plugin class unavailable.
      Since:
      11.29
    • getExternalRoutingModifier

      ExternalRoutingModifier getExternalRoutingModifier(ExternalRouting externalRouting, Optional<User> user)
      Build a ExternalRoutingModifier for the passed ExternalRouting object.
      Parameters:
      externalRouting - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a ExternalRoutingModifier associated with the ExternalRouting.
      Since:
      11.29
    • createRoutingTag

      RoutingTagModifier createRoutingTag(String name, Optional<User> user) throws ValidationException
      Create a new RoutingTag object. The RoutingTag is persisted after calling the write method of the returned RoutingTagModifier.
      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 new RoutingTag.
      Throws:
      ValidationException - if the given name is invalid.
      Since:
      12.3
    • createChatBot

      ChatBotModifier createChatBot(Optional<User> user)
      Create a new ChatBot object. The ChatBot is persisted after calling the Modifier.write() method of the returned ChatBotModifier.
      Parameters:
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a ChatBotModifier associated with the new ChatBot.
      Since:
      12.21
    • getChatBotModifier

      ChatBotModifier getChatBotModifier(ChatBot chatBot, Optional<User> user)
      Build a ChatBotModifier for the passed ChatBot object.
      Parameters:
      chatBot - the instance to modify
      user - pass a user, if called in a user context. Otherwise pass an empty optional.
      Returns:
      a ChatBotModifier associated with the ChatBot.
      Since:
      12.21