|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.ldap.ClassMapping
public class ClassMapping
Maps a Java Class to an LDAP Object Class. Is part of a schema mapping. Provides accessors to field values of a mapped object.
| Constructor Summary | |
|---|---|
ClassMapping(SchemaMapping sm)
Constructs a class mapping and adds it to the provided schema mapping. |
|
| Method Summary | |
|---|---|
void |
add(AttributeMapping am)
Adds an attribute mapping to this class mapping |
void |
addSubLink(SubLink subLink)
Add a sublink to this class mapping |
AttributeMapping |
getAttMappingByAttName(String name)
Returns the attribute mapping with the specified attribute name |
AttributeMapping |
getAttMappingByFieldName(String name)
Returns the attribute mapping with the specified field name |
int |
getAttributeCount()
Returns the number of attribute mappings of this class mapping |
Iterator<AttributeMapping> |
getAttributeIterator()
Returns an iterator for the attribute mappings of this class mapping |
String |
getClassSubContext()
Returns the RDN of the subcontext of this class mapping |
String |
getClassSubContextAtt()
Returns the name of the LDAP attribute which designates the subcontext |
String |
getClassSubContextVal()
Returns the value of the LDAP attribute which designates the subcontext |
Field |
getField(String fieldName)
Get a field by its name. |
Object |
getFieldContent(Persistent o,
String fieldName)
Gets the content of an objects field by the fields name. |
Map<String,Field> |
getFields()
Returns the fields of the java class. |
String |
getJavaClassName()
Returns the name of the Java class this mapping is for. |
String |
getObjectClass()
Returns the name of the most specific LDAP Object class |
String[] |
getObjectClasses()
Return the set of LDAP object classes for this mapping |
String |
getRDNAttName()
Returns the name of the LDAP attribute which designates the relative distinguished name (RDN) |
Object |
getRDNAttValue(Persistent o)
Returns the value of the RDN of an object |
SchemaMapping |
getSm()
Returns the schema mapping this class mapping belongs to |
ArrayList<SubLink> |
getSubLinks()
Returns the sublinks of this class mapping |
void |
setClassSubContext(String classSubContext)
Set the sub context for this class mapping. |
void |
setJavaClassName(String javaClassName)
Set the class name of the java class for this mapping. |
void |
setObjectClasses(String[] objectClasses)
Set the names of the LDAP Object classes for this class mapping. |
void |
setRDNAttName(String rDNAttName)
Set the name of the LDAP attribute which designates the relative distinguished name (RDN) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassMapping(SchemaMapping sm)
sm - the schema mapping to which the schema mapping is added| Method Detail |
|---|
public SchemaMapping getSm()
public void add(AttributeMapping am)
am - the attribute mapping to addpublic AttributeMapping getAttMappingByAttName(String name)
name - the attribute name of the mapping to look up
public AttributeMapping getAttMappingByFieldName(String name)
name - the field name of the mapping to look up
public Iterator<AttributeMapping> getAttributeIterator()
public int getAttributeCount()
public String getJavaClassName()
public void setJavaClassName(String javaClassName)
throws Exception
javaClassName - the class name
Exception - thrown when the class is not found or cannot be instantiatedpublic Map<String,Field> getFields()
public Field getField(String fieldName)
throws Exception
fieldName - the name of the field to get
Exception
public Object getFieldContent(Persistent o,
String fieldName)
throws IllegalAccessException
o - The object which field content should be gotten.fieldName - the name of the field
IllegalAccessExceptionpublic void addSubLink(SubLink subLink)
subLink - the sublink to addpublic ArrayList<SubLink> getSubLinks()
public void setObjectClasses(String[] objectClasses)
objectClasses - public String[] getObjectClasses()
public String getObjectClass()
public void setRDNAttName(String rDNAttName)
rDNAttName - the name of the attribute whose value is the RDNpublic String getRDNAttName()
public Object getRDNAttValue(Persistent o)
throws Exception
o - the object to get the value from.
Must be an instance of the java class of this class mapping
Exceptionpublic void setClassSubContext(String classSubContext)
classSubContext - the RDN of the context for this class mappingpublic String getClassSubContext()
public String getClassSubContextAtt()
public String getClassSubContextVal()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||