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> T
execute(RestrictionData restrictionData, java.util.function.Supplier<T> supplier)
Makes restriction data available during the execution of the provided supplier.protected RestrictionContextProvider
getRestrictionContextProvider()
void
setRestrictionContextProvider(RestrictionContextProvider restrictionContextProvider)
-
-
-
Method Detail
-
execute
public <T> T execute(RestrictionData restrictionData, java.util.function.Supplier<T> supplier)
Description copied from interface:RestrictionAwareService
Makes restriction data available during the execution of the provided supplier.- Specified by:
execute
in 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)
-
-