Class JpaPriceDataVendorVisibilityHandler
java.lang.Object
com.broadleafcommerce.pricing.provider.jpa.marketplace.vendor.JpaPriceDataVendorVisibilityHandler
- All Implemented Interfaces:
 com.broadleafcommerce.common.extension.data.DataRoutePartitionAware,com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler,org.springframework.core.Ordered
public class JpaPriceDataVendorVisibilityHandler
extends Object
implements com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
Responsible for performing vendor-visibility operations on 
JpaPriceData entities.- 
Field Summary
Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
ALL_MATCHFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancreateVendorNarrowingFilter(Set<String> restrictedVendorRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Will build aNodefilter string that restricts results to only include data with aJpaPriceData.getTargetVendorRef()that is matching therestrictedVendorRefs.getAssociatedVendorRef(Object persistedDomainEntity, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) intgetOrder()booleanisEntityMutableByVendorRestrictions(Object persistedDomainEntity, Set<String> restrictedVendorRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) A vendor-restricted user can only mutate price datas with a non-nullJpaPriceData.getTargetVendorRef()which matches one of theirrestrictedVendorRefs. 
- 
Constructor Details
- 
JpaPriceDataVendorVisibilityHandler
public JpaPriceDataVendorVisibilityHandler() 
 - 
 - 
Method Details
- 
canHandle
- Specified by:
 canHandlein interfacecom.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
 - 
getOrder
public int getOrder()- Specified by:
 getOrderin interfaceorg.springframework.core.Ordered- Specified by:
 getOrderin interfacecom.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
 - 
getDataRoutePartition
- Specified by:
 getDataRoutePartitionin interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
 - 
isEntityMutableByVendorRestrictions
public boolean isEntityMutableByVendorRestrictions(Object persistedDomainEntity, Set<String> restrictedVendorRefs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) A vendor-restricted user can only mutate price datas with a non-nullJpaPriceData.getTargetVendorRef()which matches one of theirrestrictedVendorRefs.- Specified by:
 isEntityMutableByVendorRestrictionsin interfacecom.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler- Parameters:
 persistedDomainEntity- the persisted-domain entity to validate mutability for. This is guaranteed to only be an entity for whichcanHandle(Class)returns true.restrictedVendorRefs- the "vendorRef" (typically a vendor ID or code) of all vendors that mutability should be restricted to. Will never be empty.contextInfo- context information surrounding sandboxing/multitenant state- Returns:
 - true if the entity is mutable by the given vendor restrictions, false otherwise
 
 - 
createVendorNarrowingFilter
public String createVendorNarrowingFilter(Set<String> restrictedVendorRefs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Will build aNodefilter string that restricts results to only include data with aJpaPriceData.getTargetVendorRef()that is matching therestrictedVendorRefs.- Specified by:
 createVendorNarrowingFilterin interfacecom.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler- Parameters:
 restrictedVendorRefs- the "vendorRef" (typically a vendor ID or code) of all vendors that the results need to be restricted to. Will never be empty.contextInfo- context information surrounding sandboxing/multitenant state. Some implementations may inform their filtration decisions with this.- Returns:
 - a 
Nodefilter string that can be used to restrict results on supported entity type(s) to only include data from therestrictedVendorRefs. Cannot return null. 
 - 
getAssociatedVendorRef
@Nullable public String getAssociatedVendorRef(Object persistedDomainEntity, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
 getAssociatedVendorRefin interfacecom.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
 
 -