|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.tnt.ldaputils.impl.LdapEntry
public class LdapEntry
Default implementation of an LDAP object. This handles a fair bit of LDAP update capability, by way of using the factory.
Created : 16-Aug-2010 8:05:16 PM MST
Field Summary | |
---|---|
protected Attributes |
attributes
This contains all of the attributes for the object |
protected boolean |
isNew
|
protected LinkedHashMap |
modificationItems
|
protected boolean |
modified
|
protected List<String> |
objectClasses
All objectClass attributes, we know they are Strings |
Fields inherited from interface ca.tnt.ldaputils.ILdapEntry |
---|
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE |
Constructor Summary | |
---|---|
LdapEntry()
|
Method Summary | |
---|---|
int |
compareTo(Object o)
|
ILdapEntry |
convertInstance(int type)
|
boolean |
equals(Object o)
|
Attributes |
getAttributes()
|
List |
getAttributeValues(String attribute)
|
Attributes |
getBindAttributes()
|
String |
getCn()
|
String |
getCN()
|
String |
getDescription()
|
LdapName |
getDn()
|
List<String> |
getObjectClasses()
Get's the types of objects this is. |
String |
getStringAttribute(Attributes attributes,
String attribute)
|
String |
getStringValue(String attribute)
|
int |
hashCode()
|
boolean |
isObjectClass(String objectClass)
|
void |
modifyAttribute(int operation,
String attribute,
Object value)
Sets the given attribute right now, and does not delay. |
void |
modifyBatchAttribute(int operation,
String attribute,
Object value)
Please note, the preferred method is to call setXXXX() where XXXX is the attribute name, followed by save(). |
void |
modifyBatchAttributes()
Runs the batch modifications requested through the ILdapEntry.modifyBatchAttribute(int, String, Object) |
void |
save()
Because LDAP operations are expensive, we have a save method. |
void |
setCn(String cn)
|
void |
setDn(LdapName dn)
|
void |
setObjectClasses(List<String> objectClasses)
|
String |
toString()
|
protected void |
updateAttribute(String attrName)
Updates the specified attribute from LDAP. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean modified
protected boolean isNew
protected LinkedHashMap modificationItems
protected Attributes attributes
protected List<String> objectClasses
Constructor Detail |
---|
public LdapEntry()
Method Detail |
---|
public LdapName getDn()
getDn
in interface ILdapEntry
public String getDescription()
getDescription
in interface ILdapEntry
public ILdapEntry convertInstance(int type) throws NamingException
convertInstance
in interface ILdapEntry
type
- the object type to convert to
NamingException
- if any conversion problems occur.public String getStringAttribute(Attributes attributes, String attribute) throws NamingException
NamingException
public List getAttributeValues(String attribute)
getAttributeValues
in interface ILdapEntry
public String getStringValue(String attribute)
getStringValue
in interface ILdapEntry
public void modifyAttribute(int operation, String attribute, Object value)
modifyAttribute
in interface ILdapEntry
operation
- on of ADD_ATTRIBUTE, REPLACE_ATTRIBUTE,
REMOVE_ATTRIBUTEattribute
- the name of the attributevalue
- the value of the attributeADD_ATTRIBUTE
,
REPLACE_ATTRIBUTE
,
REMOVE_ATTRIBUTE
public void modifyBatchAttribute(int operation, String attribute, Object value)
modifyBatchAttribute
in interface ILdapEntry
operation
- one of ADD_ATTRIBUTE, REPLACE_ATTRIBUTE,
REMOVE_ATTRIBUTEattribute
- the name of the attributevalue
- the value of the attributeADD_ATTRIBUTE
,
REPLACE_ATTRIBUTE
,
REMOVE_ATTRIBUTE
public void modifyBatchAttributes()
ILdapEntry.modifyBatchAttribute(int, String, Object)
modifyBatchAttributes
in interface ILdapEntry
public void save()
save
in interface ILdapEntry
public Attributes getBindAttributes()
getBindAttributes
in interface ILdapEntry
protected void updateAttribute(String attrName) throws NamingException
attrName
- the name of the attribute
NamingException
- if any LDAP errors occur.public Attributes getAttributes()
public List<String> getObjectClasses()
ILdapEntry
getObjectClasses
in interface ILdapEntry
public String getCN()
getCN
in interface ILdapEntry
public void setObjectClasses(List<String> objectClasses)
public boolean isObjectClass(String objectClass)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public void setDn(LdapName dn)
setDn
in interface ILdapEntry
public String getCn()
getCn
in interface ILdapEntry
public void setCn(String cn)
setCn
in interface ILdapEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is part of the LDAP Persistence API (LPA).
Copyright Trenton D. Adams <lpa at trentonadams daught ca>
LPA is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
LPA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with LPA. If not, see GNU Licenses.
See the COPYING file, in the git repository, for more information.