Interface DocumentIdHelper
-
public interface DocumentIdHelper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckTenantId(String tenantId, EventContext context)Check that the tenant id value is valid.voidcheckTenantId(Set<String> tenantIds, EventContext context)Check that the set of tenant id values is valid.StringtoElasticsearchId(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.
-
-
-
Method Detail
-
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.
-
-