|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(java.lang.String name)
Returns the attribute mapping with the specified attribute name |
AttributeMapping |
getAttMappingByFieldName(java.lang.String name)
Returns the attribute mapping with the specified field name |
int |
getAttributeCount()
Returns the number of attribute mappings of this class mapping |
java.util.Iterator<AttributeMapping> |
getAttributeIterator()
Returns an iterator for the attribute mappings of this class mapping |
java.lang.String |
getClassSubContext()
Returns the RDN of the subcontext of this class mapping |
java.lang.String |
getClassSubContextAtt()
Returns the name of the LDAP attribute which designates the subcontext |
java.lang.String |
getClassSubContextVal()
Returns the value of the LDAP attribute which designates the subcontext |
java.lang.reflect.Field |
getField(java.lang.String fieldName)
Get a field by its name. |
java.lang.Object |
getFieldContent(Persistent o,
java.lang.String fieldName)
Gets the content of an objects field by the fields name. |
java.util.Map<java.lang.String,java.lang.reflect.Field> |
getFields()
Returns the fields of the java class. |
java.lang.String |
getJavaClassName()
Returns the name of the Java class this mapping is for. |
java.lang.String |
getObjectClass()
Returns the name of the most specific LDAP Object class |
java.lang.String[] |
getObjectClasses()
Return the set of LDAP object classes for this mapping |
java.lang.String |
getRDNAttName()
Returns the name of the LDAP attribute which designates the relative distinguished name (RDN) |
java.lang.Object |
getRDNAttValue(Persistent o)
Returns the value of the RDN of an object |
SchemaMapping |
getSm()
Returns the schema mapping this class mapping belongs to |
java.util.ArrayList<SubLink> |
getSubLinks()
Returns the sublinks of this class mapping |
void |
setClassSubContext(java.lang.String classSubContext)
Set the sub context for this class mapping. |
void |
setJavaClassName(java.lang.String javaClassName)
Set the class name of the java class for this mapping. |
void |
setObjectClasses(java.lang.String[] objectClasses)
Set the names of the LDAP Object classes for this class mapping. |
void |
setRDNAttName(java.lang.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 addedMethod Detail |
---|
public SchemaMapping getSm()
public void add(AttributeMapping am)
am
- the attribute mapping to addpublic AttributeMapping getAttMappingByAttName(java.lang.String name)
name
- the attribute name of the mapping to look up
public AttributeMapping getAttMappingByFieldName(java.lang.String name)
name
- the field name of the mapping to look up
public java.util.Iterator<AttributeMapping> getAttributeIterator()
public int getAttributeCount()
public java.lang.String getJavaClassName()
public void setJavaClassName(java.lang.String javaClassName) throws java.lang.Exception
javaClassName
- the class name
java.lang.Exception
- thrown when the class is not found or cannot be instantiatedpublic java.util.Map<java.lang.String,java.lang.reflect.Field> getFields()
public java.lang.reflect.Field getField(java.lang.String fieldName) throws java.lang.Exception
fieldName
- the name of the field to get
java.lang.Exception
public java.lang.Object getFieldContent(Persistent o, java.lang.String fieldName) throws java.lang.IllegalAccessException
o
- The object which field content should be gotten.fieldName
- the name of the field
java.lang.IllegalAccessException
public void addSubLink(SubLink subLink)
subLink
- the sublink to addpublic java.util.ArrayList<SubLink> getSubLinks()
public void setObjectClasses(java.lang.String[] objectClasses)
objectClasses
- public java.lang.String[] getObjectClasses()
public java.lang.String getObjectClass()
public void setRDNAttName(java.lang.String rDNAttName)
rDNAttName
- the name of the attribute whose value is the RDNpublic java.lang.String getRDNAttName()
public java.lang.Object getRDNAttValue(Persistent o) throws java.lang.Exception
o
- the object to get the value from.
Must be an instance of the java class of this class mapping
java.lang.Exception
public void setClassSubContext(java.lang.String classSubContext)
classSubContext
- the RDN of the context for this class mappingpublic java.lang.String getClassSubContext()
public java.lang.String getClassSubContextAtt()
public java.lang.String getClassSubContextVal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |