|
||||||||||
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(java.lang.String id,
java.lang.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,
java.lang.String id,
java.lang.Object value)
Add a modification item |
LdifEntry |
clone()
Clone method |
boolean |
equals(java.lang.Object o)
|
EntryAttribute |
get(java.lang.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 |
java.util.List<Modification> |
getModificationItems()
|
Modification[] |
getModificationItemsArray()
Gets the modification items as an array. |
java.lang.String |
getNewRdn()
|
java.lang.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(java.lang.String id,
java.lang.Object value)
Add an attribute value to an existing attribute |
void |
readExternal(java.io.ObjectInput in)
|
java.util.List<EntryAttribute> |
removeAttribute(java.lang.String... ids)
Remove a list of Attributes from the LdifEntry |
void |
setChangeType(ChangeType changeType)
Set the modification type |
void |
setChangeType(java.lang.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(java.lang.String dn)
Set the Distinguished Name |
void |
setNewRdn(java.lang.String newRdn)
Set the new RDN |
void |
setNewSuperior(java.lang.String newSuperior)
Set the new superior |
int |
size()
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.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 Namepublic void setDn(java.lang.String dn) throws LdapInvalidDnException
dn
- The Distinguished Name
LdapInvalidDnException
public void setChangeType(ChangeType changeType)
changeType
- The change typepublic void setChangeType(java.lang.String changeType)
changeType
- The change typepublic void addModificationItem(Modification modification)
modification
- The modification to be addedpublic void addModificationItem(ModificationOperation modOp, EntryAttribute attr)
modOp
- The operation. One of :
- ModificationOperation.ADD_ATTRIBUTE
- ModificationOperation.REMOVE_ATTRIBUTE
- ModificationOperation.REPLACE_ATTRIBUTEattr
- The attribute to be addedpublic void addModificationItem(ModificationOperation modOp, java.lang.String id, java.lang.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 valuepublic void addAttribute(EntryAttribute attr) throws LdapException
attr
- The attribute to be added
LdapException
public void addAttribute(java.lang.String id, java.lang.Object value) throws LdapException
id
- The attribute IDvalue
- The attribute value
LdapException
public java.util.List<EntryAttribute> removeAttribute(java.lang.String... ids)
ids
- The Attributes to remove
public void putAttribute(java.lang.String id, java.lang.Object value) throws LdapException
id
- The attribute IDvalue
- The attribute value
LdapException
public ChangeType getChangeType()
public java.util.List<Modification> getModificationItems()
public Modification[] getModificationItemsArray()
public DN getDn()
public int size()
public EntryAttribute get(java.lang.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 java.lang.String getNewRdn()
public void setNewRdn(java.lang.String newRdn)
newRdn
- The new RDNpublic java.lang.String getNewSuperior()
public void setNewSuperior(java.lang.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 controlpublic LdifEntry clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- If there is some problem while cloning the instancepublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
true
if both values are equalObject.equals(Object)
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The stream from which the LdifEntry is read
java.io.IOException
- If the stream can't be read
java.lang.ClassNotFoundException
- If the LdifEntry can't be createdExternalizable.readExternal(ObjectInput)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The stream in which the ChangeLogEvent will be serialized.
java.io.IOException
- If the serialization failExternalizable#readExternal(ObjectInput)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |