Package de.hybris.platform.ldap.impex
Class ActiveDirectoryGroupCollectionTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
-
- de.hybris.platform.impex.jalo.translators.CollectionValueTranslator
-
- de.hybris.platform.ldap.impex.ActiveDirectoryGroupCollectionTranslator
-
public class ActiveDirectoryGroupCollectionTranslator extends CollectionValueTranslator
A very special (ActiveDirectory only) translator class.
This translator adds the current user to aPrincipalGroup
, which will be defined by thedistinguishedname
of this group!
Schematic query:SELECT {PK} FROM {PrincipalGroup} WHERE {dn} = ?value
// CAUTION: The parameter {dn} could be replaced by using the modifiergroupid="foo"
.
Sample 'configuration.xml' entry:<code>Employee</code> <objectclasses> <objectclass>organizationalPerson</objectclass> </objectclasses> ... <attributes> <attribute> <ldap>memberOf</ldap> <hybris>groups</hybris> <impex>(dn)[translator=de.hybris.platform.ldap.impex.ActiveDirectoryGroupCollectionTranslator, groupid=dn]</impex> </attribute> ...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ActiveDirectoryGroupCollectionTranslator.Modifiers
static class
ActiveDirectoryGroupCollectionTranslator.PrincipalGroupTranslator
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
groupid
-
Constructor Summary
Constructors Constructor Description ActiveDirectoryGroupCollectionTranslator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
getGroupId()
java.lang.Object
importValue(java.lang.String valueExpr, Item forItem)
Translates a tokenized csv value for import usage.void
init(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, processItems, splitAndUnescape, validate
-
Methods 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
-
-
-
-
Method Detail
-
getGroupId
protected static java.lang.String getGroupId()
-
init
public void init(StandardColumnDescriptor columnDescriptor)
Description copied from class:AbstractValueTranslator
Called once per header creation to allow configuring this translator using column modifiers etc.- Overrides:
init
in classCollectionValueTranslator
- Parameters:
columnDescriptor
- descriptor where the value to translate belongs to
-
importValue
public java.lang.Object importValue(java.lang.String valueExpr, Item forItem) throws JaloInvalidParameterException
Description copied from class:AbstractValueTranslator
Translates a tokenized csv value for import usage. This means that the result object must be a instance of the expected attribute type.- Overrides:
importValue
in 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
-
-