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 classDefaultIndexerTenantService.TenantBasic tenant representation used only to retrieve locales.
-
Field Summary
Fields Modifier and Type Field Description protected static StringCLIENT_REGISTRATION_IDDeprecated.static StringLOCALES_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 voidclearCache(String tenantId)Clear any cached locales for the tenant ID.protected StringgetReadTenantsPath()StringgetServiceClient()The service client to use when calling inventory services.protected StringgetTenantServiceEndpoint()protected org.springframework.web.reactive.function.client.WebClientgetWebClient()Set<String>readLocalesByTenantId(String tenantId)Returns a list of locales for the tenant with the given ID.voidsetServiceClient(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:IndexerTenantServiceReturns a list of locales for the tenant with the given ID.- Specified by:
readLocalesByTenantIdin 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:IndexerTenantServiceClear any cached locales for the tenant ID.- Specified by:
clearCachein 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"
-
-