Class ClassificationAttributeValueTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
-
- de.hybris.platform.impex.jalo.translators.SingleValueTranslator
-
- de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeValueTranslator
-
public class ClassificationAttributeValueTranslator extends SingleValueTranslator
Translates a String to aClassificationAttributeValueand vice versa. For translating the String to an attribute value, all assigned values of the specified classification attribute in respect to the classification class will be checked for a matching of code or name. In case of translating an attribute value to a String simply the code of the value is used.
-
-
Constructor Summary
Constructors Constructor Description ClassificationAttributeValueTranslator(ClassAttributeAssignment assignment)Creates a new translator specifying the assignment which can be used for retrieving all assigned values as well as the calling translator for retrieving of context information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectconvertToJalo(java.lang.String string, Item item)Converts a non-null and non-empty string into a jalo attribute value.protected java.lang.StringconvertToString(java.lang.Object obj)Converts a non-null jalo attribute value into its string representation.-
Methods inherited from class de.hybris.platform.impex.jalo.translators.SingleValueTranslator
exportValue, getEmptyValue, importValue, isEmpty
-
Methods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, init, isDebugEnabled, isInfoEnabled, setEmpty, setError, validate, warn, wasEmpty, wasUnresolved
-
-
-
-
Constructor Detail
-
ClassificationAttributeValueTranslator
public ClassificationAttributeValueTranslator(ClassAttributeAssignment assignment)
Creates a new translator specifying the assignment which can be used for retrieving all assigned values as well as the calling translator for retrieving of context information.- Parameters:
assignment- will be used for retrieving all assigned values
-
-
Method Detail
-
convertToJalo
protected java.lang.Object convertToJalo(java.lang.String string, Item item)Description copied from class:SingleValueTranslatorConverts a non-null and non-empty string into a jalo attribute value.- Specified by:
convertToJaloin classSingleValueTranslator- Parameters:
string- string to translateitem- item instance the translated value will be set to as attribute- Returns:
- Object translated value
-
convertToString
protected java.lang.String convertToString(java.lang.Object obj)
Description copied from class:SingleValueTranslatorConverts a non-null jalo attribute value into its string representation.- Specified by:
convertToStringin classSingleValueTranslator- Parameters:
obj- value to translate- Returns:
- translated value
-
-