Class DefaultRestrictionAwareService
- java.lang.Object
-
- de.hybris.platform.cmsfacades.common.service.impl.DefaultRestrictionAwareService
-
- All Implemented Interfaces:
RestrictionAwareService
public class DefaultRestrictionAwareService extends java.lang.Object implements RestrictionAwareService
Default implementation ofRestrictionAwareService. Sets restriction information in the session during the execution of a supplier.
-
-
Constructor Summary
Constructors Constructor Description DefaultRestrictionAwareService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Texecute(RestrictionData restrictionData, java.util.function.Supplier<T> supplier)Makes restriction data available during the execution of the provided supplier.protected RestrictionContextProvidergetRestrictionContextProvider()voidsetRestrictionContextProvider(RestrictionContextProvider restrictionContextProvider)
-
-
-
Method Detail
-
execute
public <T> T execute(RestrictionData restrictionData, java.util.function.Supplier<T> supplier)
Description copied from interface:RestrictionAwareServiceMakes restriction data available during the execution of the provided supplier.- Specified by:
executein interfaceRestrictionAwareService- Type Parameters:
T- The type returned by the supplier.- Parameters:
restrictionData- The restriction data to make available during the execution of the supplier.supplier- The supplier to execute.- Returns:
- The value calculated by the supplier.
-
getRestrictionContextProvider
protected RestrictionContextProvider getRestrictionContextProvider()
-
setRestrictionContextProvider
public void setRestrictionContextProvider(RestrictionContextProvider restrictionContextProvider)
-
-