Class DefaultAddOnValueProvider
- java.lang.Object
-
- de.hybris.platform.addonsupport.valueprovider.impl.DefaultAddOnValueProvider
-
- All Implemented Interfaces:
AddOnValueProvider
public class DefaultAddOnValueProvider extends java.lang.Object implements AddOnValueProvider
Default implementation of theAddOnValueProviderinterface.
-
-
Constructor Summary
Constructors Constructor Description DefaultAddOnValueProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.util.function.Supplier>getSuppliers()<T> java.util.Optional<T>getValue(java.lang.String key, java.lang.Class<T> type)Returns anOptionalfor the given key that contains the value if present.voidsetSuppliers(java.util.Map<java.lang.String,java.util.function.Supplier> suppliers)
-
-
-
Method Detail
-
getValue
public <T> java.util.Optional<T> getValue(java.lang.String key, java.lang.Class<T> type)Description copied from interface:AddOnValueProviderReturns anOptionalfor the given key that contains the value if present.- Specified by:
getValuein interfaceAddOnValueProvider- Parameters:
key- the key to retrieve the value fortype- the expected type of the value- Returns:
- an
Optionalthat either contains the value or is empty if key or type don't match
-
getSuppliers
protected java.util.Map<java.lang.String,java.util.function.Supplier> getSuppliers()
-
setSuppliers
public void setSuppliers(java.util.Map<java.lang.String,java.util.function.Supplier> suppliers)
-
-