Interface MultiTenancyStrategy

All Known Implementing Classes:
DiscriminatorMultiTenancyStrategy, NoMultiTenancyStrategy

public interface MultiTenancyStrategy
Defines how the additional information required by multiTenancy are handled.
  • Method Details

    • indexSchemaRootContributor

      Optional<IndexSchemaRootContributor> indexSchemaRootContributor()
      Returns:
      A schema contributor for the required additional properties (tenant ID, ...), or an empty optional.
    • documentIdHelper

      DocumentIdHelper documentIdHelper()
      Returns:
      A helper for creating predicates from tenant IDs.
    • documentMetadataContributor

      Optional<DocumentMetadataContributor> documentMetadataContributor()
      Returns:
      A metadata contributor for the required additional properties (tenant ID, ...), or an empty optional.
    • filterOrNull

      com.google.gson.JsonObject filterOrNull(String tenantId)
      Generate a filter for the given tenant ID, to be applied to search queries.
      Parameters:
      tenantId - The tenant id.
      Returns:
      The filter, or null if no filter is necessary.
    • filterOrNull

      com.google.gson.JsonObject filterOrNull(Set<String> tenantIds)
      Generate a filter for the given tenant IDs, to be applied to search queries.
      Parameters:
      tenantIds - The set of tenant ids.
      Returns:
      The filter, or null if no filter is necessary.
    • idProjectionExtractionHelper

      ProjectionExtractionHelper<String> idProjectionExtractionHelper()
      Returns:
      A helper for projections that need to extract the document id from search hits.