Class UserPasswordTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
-
- de.hybris.platform.impex.jalo.translators.UserPasswordTranslator
-
- All Implemented Interfaces:
SpecialValueTranslator
- Direct Known Subclasses:
ConvertPlaintextToEncodedUserPasswordTranslator
public class UserPasswordTranslator extends AbstractSpecialValueTranslator
Special translator for importing/exporting user passwords. It stores passwords directly by specifying the desired encoding together with the encoded password separated by a:.
Please refer to the platform documentation about how to configure available password encodings.Use as follows:
INSERT Employee; uid[unique=true]; @password[translator=de.hybris.platform.impex.jalo.translators.UserPasswordTranslator] ; fritz ; md5:a7c15c415c37626de8fa648127ba1ae5 ; max ; *:plainPassword
-
-
Constructor Summary
Constructors Constructor Description UserPasswordTranslator()Empty constructor for generic instantiation.UserPasswordTranslator(java.util.Set<java.lang.String> encodings)Constructor for testing purpose.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(SpecialColumnDescriptor columnDescriptor)Called once upon header creation to do some initial setup logic.java.lang.StringperformExport(Item item)Called each time an item is exported using the enclosing header.voidperformImport(java.lang.String cellValue, Item processedItem)Called each time a non-empty cell value has to be imported.-
Methods inherited from class de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
isEmpty, validate
-
-
-
-
Constructor Detail
-
UserPasswordTranslator
public UserPasswordTranslator()
Empty constructor for generic instantiation.
-
UserPasswordTranslator
public UserPasswordTranslator(java.util.Set<java.lang.String> encodings)
Constructor for testing purpose.- Parameters:
encodings- supported encodings in lower case!!
-
-
Method Detail
-
init
public void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
Description copied from interface:SpecialValueTranslatorCalled once upon header creation to do some initial setup logic.- Specified by:
initin interfaceSpecialValueTranslator- Overrides:
initin classAbstractSpecialValueTranslator- Parameters:
columnDescriptor- the newly created column descriptor- Throws:
HeaderValidationException- indicates that the column descriptor is not configured properly
-
performExport
public java.lang.String performExport(Item item) throws ImpExException
Description copied from interface:SpecialValueTranslatorCalled each time an item is exported using the enclosing header.- Specified by:
performExportin interfaceSpecialValueTranslator- Overrides:
performExportin classAbstractSpecialValueTranslator- Parameters:
item- the item to export- Returns:
- the string representation of the value to export
- Throws:
ImpExException- indicates an export error
-
performImport
public void performImport(java.lang.String cellValue, Item processedItem) throws ImpExExceptionDescription copied from interface:SpecialValueTranslatorCalled each time a non-empty cell value has to be imported.- Specified by:
performImportin interfaceSpecialValueTranslator- Overrides:
performImportin classAbstractSpecialValueTranslator- Parameters:
cellValue- the cell value stringprocessedItem- the item to import the value for- Throws:
ImpExException- indicates an import error
-
-