Class DefaultDynamicAttributesProvider
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.model.attribute.impl.DefaultDynamicAttributesProvider
-
- All Implemented Interfaces:
DynamicAttributesProvider,java.io.Serializable
public class DefaultDynamicAttributesProvider extends java.lang.Object implements DynamicAttributesProvider, java.io.Serializable
Default implementation ofDynamicAttributesProviderinterface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultDynamicAttributesProvider(java.util.Map<java.lang.String,DynamicAttributeHandler> handlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(AbstractItemModel model, java.lang.String attribute)java.lang.ObjectgetLocalized(AbstractItemModel model, java.lang.String attribute, java.util.Locale loc)booleanisDynamic(java.lang.String attributeName)Returns information whether given attribute is dynamic or notvoidset(AbstractItemModel model, java.lang.String attribute, java.lang.Object value)voidsetLocalized(AbstractItemModel model, java.lang.String attribute, java.lang.Object value, java.util.Locale loc)
-
-
-
Constructor Detail
-
DefaultDynamicAttributesProvider
public DefaultDynamicAttributesProvider(java.util.Map<java.lang.String,DynamicAttributeHandler> handlers)
-
-
Method Detail
-
get
public java.lang.Object get(AbstractItemModel model, java.lang.String attribute)
Delegates call toDynamicAttributeHandler.get(de.hybris.platform.servicelayer.model.AbstractItemModel).- Specified by:
getin interfaceDynamicAttributesProviderattribute- the attribute which is declared as dynamic.- Returns:
- the computed object returned from attribute handler.
-
set
public void set(AbstractItemModel model, java.lang.String attribute, java.lang.Object value)
Delegates call toDynamicAttributeHandler.set(de.hybris.platform.servicelayer.model.AbstractItemModel, Object).- Specified by:
setin interfaceDynamicAttributesProviderattribute- the attribute which is declared as dynamic.value- the value which is passed to attribute handler.
-
getLocalized
public java.lang.Object getLocalized(AbstractItemModel model, java.lang.String attribute, java.util.Locale loc)
Delegates call toDynamicLocalizedAttributeHandler.get(de.hybris.platform.servicelayer.model.AbstractItemModel, java.util.Locale).- Specified by:
getLocalizedin interfaceDynamicAttributesProviderattribute- the attribute which is declared as dynamic.loc- the locale for the given attribute- Returns:
- the computed object returned from attribute handler.
-
setLocalized
public void setLocalized(AbstractItemModel model, java.lang.String attribute, java.lang.Object value, java.util.Locale loc)
Delegates call toDynamicLocalizedAttributeHandler.set(de.hybris.platform.servicelayer.model.AbstractItemModel, Object, java.util.Locale).- Specified by:
setLocalizedin interfaceDynamicAttributesProviderattribute- the attribute which is declared as dynamic.value- the value which is passed to attribute handler.loc- the locale for the given attribute
-
isDynamic
public boolean isDynamic(java.lang.String attributeName)
Description copied from interface:DynamicAttributesProviderReturns information whether given attribute is dynamic or not- Specified by:
isDynamicin interfaceDynamicAttributesProvider- Parameters:
attributeName- attribute name- Returns:
- true if attribute is dynamic, false otherwise
-
-