Class DataTrackingKeyGen
java.lang.Object
com.broadleafcommerce.data.tracking.core.cache.DataTrackingKeyGen
Factory class for generating Spring Cache
KeyGenerator
instances that fulfill common
Broadleaf use cases. These are useful, as they include additional key fragments, such as tenant
and locale related information that are not obvious from cached method signatures.- Author:
- Jeff Fischer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
static class
static class
static enum
static class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.broadleafcommerce.common.extension.cache.key.ContextKeyGen
of
(DataTrackingKeyGen.KeyType keyType) static com.broadleafcommerce.common.extension.cache.key.ContextKeyGen
ofCatalogWithVendorSupport
(DataTrackingKeyGen.KeyType keyType, VendorAwareTrackablePolicyUtils vendorAwareTrackablePolicyUtils) When vendor processing is enabled, catalog-discriminated entities are also discriminated by the vendor their catalog is associated to.
-
Method Details
-
of
public static com.broadleafcommerce.common.extension.cache.key.ContextKeyGen of(DataTrackingKeyGen.KeyType keyType) -
ofCatalogWithVendorSupport
public static com.broadleafcommerce.common.extension.cache.key.ContextKeyGen ofCatalogWithVendorSupport(DataTrackingKeyGen.KeyType keyType, @Nullable VendorAwareTrackablePolicyUtils vendorAwareTrackablePolicyUtils) When vendor processing is enabled, catalog-discriminated entities are also discriminated by the vendor their catalog is associated to. Cache key generation must incorporate the current authentication's vendor restrictions and current policy requirements to account for this, so this creates key generators that also consider the requisite vendor data.- Parameters:
keyType
- a catalog-relatedDataTrackingKeyGen.KeyType
vendorAwareTrackablePolicyUtils
- (optional) the vendor-aware trackable policy utils implementation used to determine the current authentication's privileges. May be null in the event vendor processing is disabled or if policy validation is disabled. If null, no vendor privilege considerations will be added to the key.- Returns:
- a key generator incorporating catalog information from context info method arguments and vendor privileges
- Throws:
IllegalArgumentException
- if the key type is not a catalog type- See Also:
-