Interface TenantDirectory

All Superinterfaces:
HasId

public interface TenantDirectory extends HasId
The tenant directory provides access to the bounded domains and the properties of a tenant. The tenant directory is the entry point when a bounded domain needs to interact with other bounded domains in our modular monolith design approach. It is equivalent to a DNS server in a distributed microservice architecture. The provided services are:
Bounded domain registry
Provides access to the bounded domains in the tenant based on their domain name.
User registry
Provides access to the active users having access to a bounded domain based on the domain name. A list of all users is also available for historical display functions. For example, a disabled user can still be the creator of an entity in a domain.
Property registry
Simple approach to provide tenant specific information and configuration to all bounded domain. For example, the default organization date format can be defined through this mechanism.

For privacy and security reasons, no communication between tenants is supported.

  • Field Details

  • Method Details

    • boundedDomains

      Collection<BoundedDomain<?,?,?>> boundedDomains()
      Returns the bounded domains available in the tenant.
      Returns:
      bounded domains available in the tenant
    • getBoundedDomain

      Optional<BoundedDomain<?,?,?>> getBoundedDomain(@NotNull @NotNull String domain)
      Returns the bounded domain associated with the domain name in this tenant.
      Parameters:
      domain - name of the bounded domain
      Returns:
      bounded domain associated with the domain name
    • getProperty

      String getProperty(@NotNull @NotNull String property)
      Returns the requested property from the tenant directory.
      Parameters:
      property - name of the property
      Returns:
      value of the property
    • usersFor

      List<String> usersFor(@NotNull @NotNull String domain)
      Returns the list of registered users available in the domain. A registered user is a user that has been once active in the domain.
      Parameters:
      domain - name of the bounded domain
      Returns:
      list of users
    • activeUsersFor

      List<String> activeUsersFor(@NotNull @NotNull String domain)
      Returns the list of active users in the domain.
      Parameters:
      domain - name of the bounded domain
      Returns:
      list of active users
    • docs

      String docs(@NotNull @NotNull String domain)
      Returns the path to the documents folder of the domain.
      Parameters:
      domain - name of the bounded domain
      Returns:
      path to the documents folder of the domain
    • resources

      String resources(@NotNull @NotNull String domain)
      Returns the path to the resources folder of the domain.
      Parameters:
      domain - name of the bounded domain
      Returns:
      path to the resources folder of the domain