Class DefaultModelValueHandler
- java.lang.Object
-
- com.hybris.cockpitng.core.model.impl.DefaultModelValueHandler
-
- All Implemented Interfaces:
ModelValueHandler
- Direct Known Subclasses:
RestrictedModelValueHandler
public class DefaultModelValueHandler extends java.lang.Object implements ModelValueHandler
-
-
Constructor Summary
Constructors Constructor Description DefaultModelValueHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressionResolverFactorygetExpressionResolverFactory()java.lang.ObjectgetValue(java.lang.Object model, java.lang.String key)Retrieves the value from the model using the given expression.java.lang.ObjectgetValue(java.lang.Object model, java.lang.String key, boolean useSessionLanguageForLocalized)Retrieves the value from the model using the given expression.protected java.lang.ObjectgetValueFromResolver(java.lang.Object model, java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> variables)<T> java.lang.Class<T>getValueType(java.lang.Object model, java.lang.String key)Retrieves the type of the value of the model using the given expression.voidsetExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory)voidsetValue(java.lang.Object model, java.lang.String key, java.lang.Object value)Stores the given value to the model using the given expression.protected voidsetValueThroughResolver(java.lang.Object model, java.lang.String key, java.lang.Object value)
-
-
-
Method Detail
-
setValue
public final void setValue(java.lang.Object model, java.lang.String key, java.lang.Object value)Description copied from interface:ModelValueHandlerStores the given value to the model using the given expression. You can use expressions like 'product.media.code' to navigate through data structures. See implementations for detail. It also notifies the widget about the change. This is used to keep cockpit NG components like editors and actions uptodate.- Specified by:
setValuein interfaceModelValueHandler- Parameters:
model- the object to apply the expression onkey- the expression, can be like 'product.media.code'value- the value to store
-
setValueThroughResolver
protected void setValueThroughResolver(java.lang.Object model, java.lang.String key, java.lang.Object value)
-
getValue
public java.lang.Object getValue(java.lang.Object model, java.lang.String key)Description copied from interface:ModelValueHandlerRetrieves the value from the model using the given expression. You can use expressions like 'product.media.code' to navigate through data structures. See implementations for detail.- Specified by:
getValuein interfaceModelValueHandler- Parameters:
model- the object to apply the expression onkey- the expression, can be like 'product.media.code'- Returns:
- the value of evaluation ef the given expression
-
getValue
public java.lang.Object getValue(java.lang.Object model, java.lang.String key, boolean useSessionLanguageForLocalized)Description copied from interface:ModelValueHandlerRetrieves the value from the model using the given expression. You can use expressions like 'product.media.code' to navigate through data structures. See implementations for detail.- Specified by:
getValuein interfaceModelValueHandler- Parameters:
model- the object to apply the expression onkey- the expression, can be like 'product.media.code'useSessionLanguageForLocalized- if true the value for the session language will be returned instead of all values for all available locales- Returns:
- the value of evaluation ef the given expression
-
getValueFromResolver
protected java.lang.Object getValueFromResolver(java.lang.Object model, java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> variables)
-
getValueType
public <T> java.lang.Class<T> getValueType(java.lang.Object model, java.lang.String key)Description copied from interface:ModelValueHandlerRetrieves the type of the value of the model using the given expression.- Specified by:
getValueTypein interfaceModelValueHandler- Parameters:
model- the object to apply the expression onkey- the expression, can be like 'product.media.code'- Returns:
- the type of the value
-
getExpressionResolverFactory
public ExpressionResolverFactory getExpressionResolverFactory()
-
setExpressionResolverFactory
public void setExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory)
-
-