org.identityconnectors.ldap.schema
Class LdapSchemaMapping

java.lang.Object
  extended by org.identityconnectors.ldap.schema.LdapSchemaMapping

public class LdapSchemaMapping
extends Object

The authoritative description of the mapping between the LDAP schema and the connector schema.

Author:
Andrei Badea

Field Summary
static org.identityconnectors.framework.common.objects.ObjectClass ANY_OBJECT_CLASS
           
 
Constructor Summary
LdapSchemaMapping(LdapConnection conn)
           
 
Method Summary
 String create(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Name name, Attributes initialAttrs)
           
 org.identityconnectors.framework.common.objects.Attribute createAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass, String attrName, LdapEntry entry, boolean emptyWhenNotFound)
          Returns an empty attribute instead of null when emptyWhenNotFound is true.
 org.identityconnectors.framework.common.objects.Name createName(org.identityconnectors.framework.common.objects.ObjectClass oclass, LdapEntry entry)
          Creates a Name for the given entry.
 org.identityconnectors.framework.common.objects.Uid createUid(org.identityconnectors.framework.common.objects.ObjectClass oclass, LdapEntry entry)
          Creates a Uid for the given entry.
 org.identityconnectors.framework.common.objects.Uid createUid(org.identityconnectors.framework.common.objects.ObjectClass oclass, String entryDN)
           
 Attribute encodeAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Attribute attr)
           
 GuardedPasswordAttribute encodePassword(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Attribute attr)
           
 Set<String> getEffectiveLdapClasses(org.identityconnectors.framework.common.objects.ObjectClass oclass)
          Returns the LDAP object class to which the given framework object class is mapped in a transitive manner, i.e., together with any superior object classes, any superiors thereof, etc..
 String getEntryDN(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Name name)
           
 String getLdapAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Attribute attr)
          Returns the name of the LDAP attribute which corresponds to the given attribute of the given object class, or null.
 String getLdapAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass, String attrName, boolean transfer)
           
 Set<String> getLdapAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass, Set<String> attrs, boolean transfer)
          Returns the names of the LDAP attributes which correspond to the given attribute names of the given object class.
 List<String> getLdapClasses(org.identityconnectors.framework.common.objects.ObjectClass oclass)
          Returns the LDAP object classes to which the given framework object class is mapped.
 String getLdapNameAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass)
          Returns the LDAP attribute which corresponds to Name for the given object class.
 String getLdapUidAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass)
          Returns the LDAP attribute which corresponds to Uid.
 List<String> getUserNameLdapAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass)
           
 void removeNonReadableAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass, Set<String> attrNames)
           
 String rename(org.identityconnectors.framework.common.objects.ObjectClass oclass, String entryDN, org.identityconnectors.framework.common.objects.Name newName)
           
 org.identityconnectors.framework.common.objects.Schema schema()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_OBJECT_CLASS

public static final org.identityconnectors.framework.common.objects.ObjectClass ANY_OBJECT_CLASS
Constructor Detail

LdapSchemaMapping

public LdapSchemaMapping(LdapConnection conn)
Method Detail

schema

public org.identityconnectors.framework.common.objects.Schema schema()

getLdapClasses

public List<String> getLdapClasses(org.identityconnectors.framework.common.objects.ObjectClass oclass)
Returns the LDAP object classes to which the given framework object class is mapped.


getEffectiveLdapClasses

public Set<String> getEffectiveLdapClasses(org.identityconnectors.framework.common.objects.ObjectClass oclass)
Returns the LDAP object class to which the given framework object class is mapped in a transitive manner, i.e., together with any superior object classes, any superiors thereof, etc..


getUserNameLdapAttributes

public List<String> getUserNameLdapAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass)

getLdapAttribute

public String getLdapAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                               String attrName,
                               boolean transfer)

getLdapAttribute

public String getLdapAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                               org.identityconnectors.framework.common.objects.Attribute attr)
Returns the name of the LDAP attribute which corresponds to the given attribute of the given object class, or null.


getLdapAttributes

public Set<String> getLdapAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                     Set<String> attrs,
                                     boolean transfer)
Returns the names of the LDAP attributes which correspond to the given attribute names of the given object class. If transfer is true, the binary option will be added to the attributes which need it.


getLdapUidAttribute

public String getLdapUidAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass)
Returns the LDAP attribute which corresponds to Uid. Should never return null.


getLdapNameAttribute

public String getLdapNameAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass)
Returns the LDAP attribute which corresponds to Name for the given object class. Might return null if, for example, the object class was not configured explicitly in the configuration.


createUid

public org.identityconnectors.framework.common.objects.Uid createUid(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                     LdapEntry entry)
Creates a Uid for the given entry. It is assumed that the entry contains the attribute returned by getLdapUidAttribute(org.identityconnectors.framework.common.objects.ObjectClass).


createUid

public org.identityconnectors.framework.common.objects.Uid createUid(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                     String entryDN)

createName

public org.identityconnectors.framework.common.objects.Name createName(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                       LdapEntry entry)
Creates a Name for the given entry. It is assumed that the entry contains the attribute returned by getLdapNameAttribute(org.identityconnectors.framework.common.objects.ObjectClass).


createAttribute

public org.identityconnectors.framework.common.objects.Attribute createAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                                 String attrName,
                                                                                 LdapEntry entry,
                                                                                 boolean emptyWhenNotFound)
Returns an empty attribute instead of null when emptyWhenNotFound is true.


create

public String create(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                     org.identityconnectors.framework.common.objects.Name name,
                     Attributes initialAttrs)

encodeAttribute

public Attribute encodeAttribute(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                 org.identityconnectors.framework.common.objects.Attribute attr)

encodePassword

public GuardedPasswordAttribute encodePassword(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                               org.identityconnectors.framework.common.objects.Attribute attr)

getEntryDN

public String getEntryDN(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                         org.identityconnectors.framework.common.objects.Name name)

rename

public String rename(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                     String entryDN,
                     org.identityconnectors.framework.common.objects.Name newName)

removeNonReadableAttributes

public void removeNonReadableAttributes(org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                        Set<String> attrNames)


Copyright © 2012. All Rights Reserved.