Interface DocumentIdHelper


public interface DocumentIdHelper
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkTenantId(String tenantId, EventContext context)
    Check that the tenant id value is valid.
    void
    checkTenantId(Set<String> tenantIds, EventContext context)
    Check that the set of tenant id values is valid.
    Converts the object id to an Elasticsearch id: in the case of discriminator-based multi-tenancy, the id of the object is not unique so we need to disambiguate it.
  • Method Details

    • checkTenantId

      void checkTenantId(String tenantId, EventContext context)
      Check that the tenant id value is valid.
      Parameters:
      tenantId - The tenant id.
      context - The context to add to exceptions (if any).
    • checkTenantId

      void checkTenantId(Set<String> tenantIds, EventContext context)
      Check that the set of tenant id values is valid.
      Parameters:
      tenantIds - The set of tenant ids.
      context - The context to add to exceptions (if any).
    • toElasticsearchId

      String toElasticsearchId(String tenantId, String id)
      Converts the object id to an Elasticsearch id: in the case of discriminator-based multi-tenancy, the id of the object is not unique so we need to disambiguate it.
      Parameters:
      tenantId - The id of the tenant. Might be null if multiTenancy is disabled.
      id - The id of the indexed object.
      Returns:
      The Elasticsearch id.