Interface TenantResolver

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALL
      Constant for a mapping to all tenants.
      static java.lang.String DEFAULT
      The name of the default tenant.
      static java.lang.String PREFIX
      Tenant Resolver Configuration Prefix.
    • Field Detail

      • PREFIX

        static final java.lang.String PREFIX
        Tenant Resolver Configuration Prefix.
        See Also:
        Constant Field Values
      • DEFAULT

        static final java.lang.String DEFAULT
        The name of the default tenant.
        See Also:
        Constant Field Values
      • ALL

        static final java.lang.String ALL
        Constant for a mapping to all tenants.
        See Also:
        Constant Field Values
    • Method Detail

      • resolveTenantIdentifier

        @NonNull
        java.io.Serializable resolveTenantIdentifier()
                                              throws TenantNotFoundException

        Resolves the current tenant identifier.

        In a Multi Tenant setup where a single database is being used amongst multiple tenants this would be the object that is used as the tenantId property for each domain class.

        Returns:
        The tenant identifier
        Throws:
        TenantNotFoundException - if tenant not found