Package com.groiss.ldap
Class AttributeMapping
java.lang.Object
com.groiss.ldap.AttributeMapping
Maps LDAP attribute names to field names of java objects.
Is part of a class mapping.
Different kinds of mapping can be specified via the provided finals.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Reference typeBY_BOOL
designates a reference based on a boolean value (TRUE/FALSE)static final int
Reference typeBY_CLASS
designates a reference based on the name of the Java objects classstatic final int
Reference typeBY_DN
designates a reference based on the distinguished name (LDAP-DN) of the class mapping of the objects classstatic final int
Reference typeBY_ID
designates a reference based on the value of theid
field of the Java Objectstatic final int
Reference typeBY_ID_CHAIN
designates a reference based on a chain of id referencesstatic final int
Reference typeBY_OID
designates a reference based on the value of fieldoid
of the java objectstatic final int
Reference typeBY_PWD
designates a special treatment of the password field according to RFC 2307static final int
Reference typeBY_VALUE
designates a reference based on the attributes value. -
Constructor Summary
ConstructorDescriptionAttributeMapping
(ClassMapping cm, String attName, String fieldName) Constructs a new AttributeMapping and adds it to a Class Mapping -
Method Summary
Modifier and TypeMethodDescriptionReturns the LDAP attribute name of this attribute mappinggetCm()
Returns the class mapping this attribute mapping belongs toReturns the Java field name of this attribute mappingint
Returns the reference type of this mappingvoid
setRefType
(int refType) Sets the reference type of this mapping
-
Field Details
-
BY_VALUE
public static final int BY_VALUEReference typeBY_VALUE
designates a reference based on the attributes value. This is the default reference type.- See Also:
-
BY_ID
public static final int BY_IDReference typeBY_ID
designates a reference based on the value of theid
field of the Java Object- See Also:
-
BY_DN
public static final int BY_DNReference typeBY_DN
designates a reference based on the distinguished name (LDAP-DN) of the class mapping of the objects class- See Also:
-
BY_BOOL
public static final int BY_BOOLReference typeBY_BOOL
designates a reference based on a boolean value (TRUE/FALSE)- See Also:
-
BY_ID_CHAIN
public static final int BY_ID_CHAINReference typeBY_ID_CHAIN
designates a reference based on a chain of id references- See Also:
-
BY_OID
public static final int BY_OIDReference typeBY_OID
designates a reference based on the value of fieldoid
of the java object- See Also:
-
BY_CLASS
public static final int BY_CLASSReference typeBY_CLASS
designates a reference based on the name of the Java objects class- See Also:
-
BY_PWD
public static final int BY_PWDReference typeBY_PWD
designates a special treatment of the password field according to RFC 2307- See Also:
-
-
Constructor Details
-
AttributeMapping
Constructs a new AttributeMapping and adds it to a Class Mapping- Parameters:
cm
- the class mapping to which the attribute mapping is addedattName
- the LDAP attribute namefieldName
- the Java field name
-
-
Method Details
-
getCm
Returns the class mapping this attribute mapping belongs to- Returns:
- the class mapping
-
getFieldName
Returns the Java field name of this attribute mapping- Returns:
- the Java field name
-
getAttName
Returns the LDAP attribute name of this attribute mapping- Returns:
- the LDAP attribute name
-
setRefType
public void setRefType(int refType) Sets the reference type of this mapping- Parameters:
refType
-
-
getRefType
public int getRefType()Returns the reference type of this mapping- Returns:
- the reference type of this mapping
-