Interface PersistencyHandler


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

      • createTenant

        TenantModifier createTenant​(java.util.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,
                                         java.util.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​(java.util.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,
                                             java.util.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​(java.lang.String name,
                                        java.util.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,
                                             java.util.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​(java.util.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,
                                                           java.util.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​(java.util.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,
                                           java.util.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​(java.util.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,
                                                 java.util.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​(java.util.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,
                                                   java.util.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​(java.util.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​(java.util.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,
                                                                               java.util.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​(java.util.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,
                                                                                 java.util.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​(java.util.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,
                                                 java.util.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​(java.util.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,
                                     java.util.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
      • getExternalRoutingModifier

        ExternalRoutingModifier getExternalRoutingModifier​(ExternalRouting externalRouting,
                                                           java.util.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​(java.lang.String name,
                                            java.util.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