Interface MultiTenancyProvider


public interface MultiTenancyProvider
Interface to be implemented where the user wants to allocate a "tenantId" for each datastore access. One example of such a usage is where the web system "session" has a 'username' and so can access it using this method.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the tenant id for the current tenant (for use in all WRITE operations).
    Return the tenant id(s) that the current tenant can view (for use in all READ operations).
  • Method Details

    • getTenantId

      String getTenantId(ExecutionContext ec)
      Return the tenant id for the current tenant (for use in all WRITE operations).
      Parameters:
      ec - ExecutionContext
      Returns:
      The tenant id
    • getTenantReadIds

      String[] getTenantReadIds(ExecutionContext ec)
      Return the tenant id(s) that the current tenant can view (for use in all READ operations).
      Parameters:
      ec - ExecutionContext
      Returns:
      The read tenant ids