|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsc.beans.LscBean
public abstract class LscBean
Basic bean used to centralize methods across all beans
This object mainly provides methods to store and access "attributes", i.e. named fields and their values.
This implementation ignores the case of attribute names, and uses Java Sets to store lists of values, so values must be unique and are unordered.
| Constructor Summary | |
|---|---|
LscBean()
|
|
| Method Summary | |
|---|---|
LscBean |
clone()
Clone this Bean object. |
void |
generateDn()
Generate the distinguish name according to the information on the bean. |
Set<Object> |
getAttributeAsSetById(String id)
Get an attribute from its name as a Set. |
Attribute |
getAttributeById(String id)
Get an attribute from its name. |
String |
getAttributeFirstValueById(String id)
Get the first value of an attribute from its name |
Set<String> |
getAttributesNames()
Get the attributes name list. |
String |
getAttributeValueById(String id)
Deprecated. |
List<String> |
getAttributeValuesById(String id)
Get all values of an attribute from its name |
DataSchemaProvider |
getDataSchema()
|
String |
getDistinguishedName()
Default distinguished name getter. |
String |
getDistinguishName()
Deprecated. Use getDistinguishedName() |
String |
getDN()
Default distinguished name getter. |
String |
getFullDistinguishedName()
Distinguish name getter that makes sure to return the FULL DN (including suffix). |
static LscBean |
getInstance(SearchResult entry,
String baseDn,
Class<?> c)
Set a bean from an LDAP entry |
void |
setAttribute(Attribute attr)
Set an attribute. |
void |
setAttribute(String attrName,
Set<Object> attrValues)
Set an attribute. |
void |
setDataSchema(DataSchemaProvider dataSchema)
|
void |
setDistinguishedName(String dn)
Default distinguishedName setter. |
void |
setDistinguishName(String dn)
Deprecated. Use setDistinguishedName(String) |
static void |
setMetadata(ResultSetMetaData metaData)
Manage something there ! |
String |
toString()
Bean pretty printer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LscBean()
| Method Detail |
|---|
public final Attribute getAttributeById(String id)
getAttributeById in interface IBeanid - the name
public final Set<Object> getAttributeAsSetById(String id)
getAttributeAsSetById in interface IBeanid - the name
public final String getAttributeValueById(String id)
throws NamingException
getAttributeValueById in interface IBeanid - The attribute name (case insensitive)
NamingException
public final String getAttributeFirstValueById(String id)
throws NamingException
getAttributeFirstValueById in interface IBeanid - The attribute name (case insensitive)
NamingException
public final List<String> getAttributeValuesById(String id)
throws NamingException
getAttributeValuesById in interface IBeanid - The attribute name (case insensitive)
NamingExceptionpublic final Set<String> getAttributesNames()
getAttributesNames in interface IBeanpublic final void setAttribute(Attribute attr)
setAttribute in interface IBeanattr - the attribute to set
public final void setAttribute(String attrName,
Set<Object> attrValues)
setAttribute in interface IBeanattrName - The attribute name.attrValues - A set of values for the attribute.public final String getDistinguishName()
getDistinguishedName()
getDistinguishName in interface IBeanpublic final String getDistinguishedName()
getDistinguishedName in interface IBeanpublic final String getDN()
public final String getFullDistinguishedName()
public final void setDistinguishName(String dn)
setDistinguishedName(String)
setDistinguishName in interface IBeandn - The distinguishedName to setpublic final void setDistinguishedName(String dn)
setDistinguishedName in interface IBeandn - The distinguishedName to set
public void generateDn()
throws NamingException
IBean
generateDn in interface IBeanNamingException - thrown is a directory exception is encountered while
generating the new distinguish namepublic final String toString()
toString in class Object
public LscBean clone()
throws CloneNotSupportedException
clone in interface IBeanclone in class ObjectCloneNotSupportedExceptionpublic void setDataSchema(DataSchemaProvider dataSchema)
public DataSchemaProvider getDataSchema()
public static void setMetadata(ResultSetMetaData metaData)
metaData -
public static LscBean getInstance(SearchResult entry,
String baseDn,
Class<?> c)
throws NamingException
entry - the LDAP entrybaseDn - the base Dn used to set the right Dnc - class to instantiate
NamingException - thrown if a directory exception is encountered while
looking at the entry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||