public interface LDAPEntryTransformer<K,V>
To specify an entry transformer for a given Infinispan cache that is
backed by an LDAP store, provide its class name to the
store configuration.
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getModifiableAttributes()
Returns the names of the LDAP directory attributes that may be
modified when an Infinispan entry is updated or replaced via the
Map interface. |
boolean |
includesAttributesWithOptions()
Returns
true if any of the modifiable attributes may include options (such as a flag
indicating a binary value, or a language tag). |
com.unboundid.ldap.sdk.RDN |
resolveRDN(K key)
Resolves the specified Infinispan entry key to a Relative
Distinguished Name (RDN) for the matching LDAP directory entry.
|
com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> |
toInfinispanEntry(LDAPEntry ldapEntry)
Transforms the specified LDAP entry to an Infinispan entry (key /
value / metadata triple).
|
LDAPEntry |
toLDAPEntry(com.unboundid.ldap.sdk.DN baseDN,
com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
Transforms the specified Infinispan entry (key / value pair with
optional metadata) to an LDAP directory entry ready to be written.
|
Set<String> getModifiableAttributes()
Map interface. Attributes that identify the LDAP
entry (form its Relative Distinguished Name (RDN)) and the
attribute objectClass that defined its classes are typically
immutable for an entry and therefore must not be included.
Operational (meta) attributes must not be included either.
Example:
User with fields id,
givenName, surname and email.
uid,
givenName, sn and mail of the LDAP class
inetOrgPerson.
uid is never
changed for a user, and only givenName, sn and
mail may be updated. This method should then return the
set givenName, sn, mail.
objectClass, attributes that form the
Relative Distinguished Name (RDN), or operational
attributes. Must not be empty or null.boolean includesAttributesWithOptions()
true if any of the modifiable attributes may include options (such as a flag
indicating a binary value, or a language tag).true if any of the modifiable attributes may
include options (such as a binary flag or a language tag),
else false.com.unboundid.ldap.sdk.RDN resolveRDN(K key)
Example:
User keyed by its id field which
is a String.
id fields maps to the LDAP attribute
uid.
"cae7t" key must then resolve to the RDN
uid=cae7t.
Composite keys may map to RDNs with multiple attributes, e.g.
uid=cae7t+ou=sales.
key - The key. Not null.LDAPEntry toLDAPEntry(com.unboundid.ldap.sdk.DN baseDN, com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
LDAPWriteStrategy.
Example:
ou=people,dc=wondlerland,dc=net
uid=cae7t,
givenName=Alice, surname=Adams and
email=alice@wonderland.net.
Resulting LDAP entry:
dn: uid=cae7t,ou=people,dc=wondlerland,dc=net objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson uid: cae7t cn: Alice Adams sn: Adams givenName: Alice mail: alice@wonderland.net
baseDN - The Distinguished Name (DN) of the directory
branch where the entry is located. Not
null.infinispanEntry - The Infinispan entry. Not null.com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> toInfinispanEntry(LDAPEntry ldapEntry)
Example:
LDAP entry:
dn: uid=cae7t,ou=people,dc=wondlerland,dc=net objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson uid: cae7t cn: Alice Adams sn: Adams givenName: Alice mail: alice@wonderland.net
Resulting key / value pair:
uid=cae7t,
givenName=Alice, surname=Adams and
email=alice@wonderland.net.
ldapEntry - The LDAP entry. Not null.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.