Class DefaultIndexerTenantService
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.service.DefaultIndexerTenantService
-
- All Implemented Interfaces:
IndexerTenantService
public class DefaultIndexerTenantService extends Object implements IndexerTenantService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultIndexerTenantService.Tenant
Basic tenant representation used only to retrieve locales.
-
Field Summary
Fields Modifier and Type Field Description protected static String
CLIENT_REGISTRATION_ID
Deprecated.static String
LOCALES_CACHE_BY_TENANT_ID
-
Constructor Summary
Constructors Constructor Description DefaultIndexerTenantService(org.springframework.web.reactive.function.client.WebClient webClient, String tenantServiceEndpoint, String readTenantsPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache(String tenantId)
Clear any cached locales for the tenant ID.protected String
getReadTenantsPath()
String
getServiceClient()
The service client to use when calling inventory services.protected String
getTenantServiceEndpoint()
protected org.springframework.web.reactive.function.client.WebClient
getWebClient()
Set<String>
readLocalesByTenantId(String tenantId)
Returns a list of locales for the tenant with the given ID.void
setServiceClient(String serviceClient)
The service client to use when calling inventory services.
-
-
-
Field Detail
-
LOCALES_CACHE_BY_TENANT_ID
public static final String LOCALES_CACHE_BY_TENANT_ID
- See Also:
- Constant Field Values
-
CLIENT_REGISTRATION_ID
@Deprecated protected static final String CLIENT_REGISTRATION_ID
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
readLocalesByTenantId
@Cacheable(cacheNames="localesCacheByTenantId", sync=true) public Set<String> readLocalesByTenantId(String tenantId)
Description copied from interface:IndexerTenantService
Returns a list of locales for the tenant with the given ID.- Specified by:
readLocalesByTenantId
in interfaceIndexerTenantService
- Parameters:
tenantId
- The tenant ID to get locales for- Returns:
- Locales for the tenant ID
-
clearCache
@CacheEvict("localesCacheByTenantId") public void clearCache(String tenantId)
Description copied from interface:IndexerTenantService
Clear any cached locales for the tenant ID.- Specified by:
clearCache
in interfaceIndexerTenantService
- Parameters:
tenantId
- The tenant ID to clear
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient()
-
getTenantServiceEndpoint
protected String getTenantServiceEndpoint()
-
getReadTenantsPath
protected String getReadTenantsPath()
-
getServiceClient
public String getServiceClient()
The service client to use when calling inventory services. Default is "indexerclient"
-
setServiceClient
public void setServiceClient(String serviceClient)
The service client to use when calling inventory services. Default is "indexerclient"
-
-