|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.directory.shared.ldap.ldif.LdifEntry
public class LdifEntry
A entry to be populated by an ldif parser. We will have different kind of entries : - added entries - deleted entries - modified entries - RDN modified entries - DN modified entries
| Field Summary | |
|---|---|
static Modification[] |
EMPTY_MODS
Used in toArray() |
| Constructor Summary | |
|---|---|
LdifEntry()
Creates a new Entry object. |
|
| Method Summary | |
|---|---|
void |
addAttribute(EntryAttribute attr)
Add an attribute to the entry |
void |
addAttribute(String id,
Object value)
Add an attribute to the entry |
void |
addModificationItem(Modification modification)
Add a modification item (used by modify operations) |
void |
addModificationItem(ModificationOperation modOp,
EntryAttribute attr)
Add a modification item (used by modify operations) |
void |
addModificationItem(ModificationOperation modOp,
String id,
Object value)
Add a modification item |
LdifEntry |
clone()
Clone method |
boolean |
equals(Object o)
|
EntryAttribute |
get(String attributeId)
Returns a attribute given it's id |
ChangeType |
getChangeType()
Get the change type |
Control |
getControl()
|
DN |
getDn()
|
Entry |
getEntry()
Get the entry's entry |
List<Modification> |
getModificationItems()
|
Modification[] |
getModificationItemsArray()
Gets the modification items as an array. |
String |
getNewRdn()
|
String |
getNewSuperior()
|
int |
hashCode()
|
boolean |
isChangeAdd()
|
boolean |
isChangeDelete()
|
boolean |
isChangeModDn()
|
boolean |
isChangeModify()
|
boolean |
isChangeModRdn()
|
boolean |
isDeleteOldRdn()
|
boolean |
isEntry()
Tells if the current entry is a added one |
void |
putAttribute(String id,
Object value)
Add an attribute value to an existing attribute |
void |
readExternal(ObjectInput in)
|
List<EntryAttribute> |
removeAttribute(String... ids)
Remove a list of Attributes from the LdifEntry |
void |
setChangeType(ChangeType changeType)
Set the modification type |
void |
setChangeType(String changeType)
Set the change type |
void |
setControl(Control control)
Add a control to the entry |
void |
setDeleteOldRdn(boolean deleteOldRdn)
Set the flage deleteOldRdn |
void |
setDn(DN dn)
Set the Distinguished Name |
void |
setDn(String dn)
Set the Distinguished Name |
void |
setNewRdn(String newRdn)
Set the new RDN |
void |
setNewSuperior(String newSuperior)
Set the new superior |
int |
size()
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Modification[] EMPTY_MODS
| Constructor Detail |
|---|
public LdifEntry()
| Method Detail |
|---|
public void setDn(DN dn)
dn - The Distinguished Name
public void setDn(String dn)
throws InvalidNameException
dn - The Distinguished Name
InvalidNameExceptionpublic void setChangeType(ChangeType changeType)
changeType - The change typepublic void setChangeType(String changeType)
changeType - The change typepublic void addModificationItem(Modification modification)
modification - The modification to be added
public void addModificationItem(ModificationOperation modOp,
EntryAttribute attr)
modOp - The operation. One of :
- ModificationOperation.ADD_ATTRIBUTE
- ModificationOperation.REMOVE_ATTRIBUTE
- ModificationOperation.REPLACE_ATTRIBUTEattr - The attribute to be added
public void addModificationItem(ModificationOperation modOp,
String id,
Object value)
modOp - The operation. One of :
- ModificationOperation.ADD_ATTRIBUTE
- ModificationOperation.REMOVE_ATTRIBUTE
- ModificationOperation.REPLACE_ATTRIBUTEmodOp - The modification operation valueid - The attribute's IDvalue - The attribute's value
public void addAttribute(EntryAttribute attr)
throws NamingException
attr - The attribute to be added
NamingException
public void addAttribute(String id,
Object value)
throws NamingException
id - The attribute IDvalue - The attribute value
NamingExceptionpublic List<EntryAttribute> removeAttribute(String... ids)
ids - The Attributes to remove
public void putAttribute(String id,
Object value)
throws NamingException
id - The attribute IDvalue - The attribute value
NamingExceptionpublic ChangeType getChangeType()
public List<Modification> getModificationItems()
public Modification[] getModificationItemsArray()
public DN getDn()
public int size()
public EntryAttribute get(String attributeId)
attributeId - The attribute Id
public Entry getEntry()
public boolean isDeleteOldRdn()
public void setDeleteOldRdn(boolean deleteOldRdn)
deleteOldRdn - True if the old RDN should be deletedpublic String getNewRdn()
public void setNewRdn(String newRdn)
newRdn - The new RDNpublic String getNewSuperior()
public void setNewSuperior(String newSuperior)
newSuperior - The new Superiorpublic boolean isChangeAdd()
public boolean isChangeDelete()
public boolean isChangeModDn()
public boolean isChangeModRdn()
public boolean isChangeModify()
public boolean isEntry()
true if the entry is addedpublic Control getControl()
public void setControl(Control control)
control - The control
public LdifEntry clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException - If there is some problem while cloning the instancepublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object o)
equals in class Objecttrue if both values are equalObject.equals(Object)
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface Externalizablein - The stream from which the LdifEntry is read
IOException - If the stream can't be read
ClassNotFoundException - If the LdifEntry can't be createdExternalizable.readExternal(ObjectInput)
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - The stream in which the ChangeLogEvent will be serialized.
IOException - If the serialization failExternalizable#readExternal(ObjectInput)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||