Package de.hybris.platform.ldap.impex
Class ExtractUserGroupTranslator
java.lang.Object
de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
de.hybris.platform.impex.jalo.translators.CollectionValueTranslator
de.hybris.platform.ldap.impex.ExtractUserGroupTranslator
This translator adds the current user to a principalgroup, which will be defined by the distinguishedname of this
group!
Schematic query: SELECT {PK} FROM {PrincipalGroup} WHERE {dn} = ?value // CAUTION: The parmeter {dn} could be replaced by using the modifier grouid="foo"
The value of '?value' will be generated from the 'dn' of the current user !!!
Sample 'configuration.xml' entry:
Employee
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionimportValue(String valueExpr, Item forItem) Translates a tokenized csv value for import usage.voidinit(StandardColumnDescriptor columnDescriptor) Called once per header creation to allow configuring this translator using column modifiers etc.Methods inherited from class de.hybris.platform.impex.jalo.translators.CollectionValueTranslator
exportValue, getCollectionValueDelimiter, getElementTranslator, isDelimiter, isEmpty, joinAndEscape, processItem, processItem, processItems, processItems, splitAndUnescape, validateMethods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, isDebugEnabled, isInfoEnabled, setEmpty, setError, warn, wasEmpty, wasUnresolved
-
Field Details
-
groupid
-
-
Constructor Details
-
ExtractUserGroupTranslator
public ExtractUserGroupTranslator()
-
-
Method Details
-
init
Description copied from class:AbstractValueTranslatorCalled once per header creation to allow configuring this translator using column modifiers etc.- Overrides:
initin classCollectionValueTranslator- Parameters:
columnDescriptor- descriptor where the value to translate belongs to
-
importValue
Description copied from class:AbstractValueTranslatorTranslates a tokenized csv value for import usage. This means that the result object must be a instance of the expected attribute type.- Overrides:
importValuein classCollectionValueTranslator- Parameters:
valueExpr- expression to translateforItem- the target item in case it already exist, null otherwise (for partOf attributes!)- Returns:
- Object translated value
- Throws:
JaloInvalidParameterException- value can not be translated with this translator or is invalid
-