|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openadaptor.adaptor.ldap.LDAPEntryModification
public class LDAPEntryModification
Contains all the details for a modification to an entry in the LDAP server. Constants ADD, MODIFY and DELETE represent the possible types of modification to an entry. Modifications to the actual attribute use the JNDI ModificationItem class, and the DirContext constants.
Field Summary | |
---|---|
static int |
ADD_ENTRY
defines modification actions (add, modify, delete) |
static int |
DELETE_ENTRY
|
static int |
MODIFY_ENTRY
|
Constructor Summary | |
---|---|
LDAPEntryModification(java.lang.String dn,
int modOp)
Create a new modification. |
|
LDAPEntryModification(java.lang.String dn,
int modOp,
java.lang.String description,
java.lang.Integer changeNumber,
java.lang.String changeTime)
Create a new modification. |
Method Summary | |
---|---|
void |
addModification(javax.naming.directory.ModificationItem mod)
Adds the modification item to this entry modification. |
void |
addModification(java.lang.String attribName,
int modOp,
java.lang.Object value)
Add a new modification to this entry mod. |
void |
addModifications(javax.naming.directory.ModificationItem[] mods)
Adds the modification items to this entry modification. |
java.lang.Integer |
getChangeNumber()
Get the change number. |
java.lang.String |
getChangeTime()
Get the change time. |
java.lang.String |
getDescription()
Get the current description. |
java.lang.String |
getDN()
Get the current dn. |
javax.naming.directory.ModificationItem[] |
getModifications()
Get an array of the attribute modifications. |
int |
getModOp()
Get the current modOp. |
boolean |
isValidModOp(int modOp)
Check to see if the given integer is a valid value for the modOp field. |
void |
setChangeNumber(java.lang.Integer changeNumber)
Set the change number. |
void |
setChangeTime(java.lang.String changeTime)
Set the change time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ADD_ENTRY
public static final int MODIFY_ENTRY
public static final int DELETE_ENTRY
Constructor Detail |
---|
public LDAPEntryModification(java.lang.String dn, int modOp)
dn
- The dn of the entry which will be modified. Cannot be null.modOp
- The type of modification to make to the entry. This
should be one of constant modification types defined. Cannot be null.public LDAPEntryModification(java.lang.String dn, int modOp, java.lang.String description, java.lang.Integer changeNumber, java.lang.String changeTime)
dn
- The dn of the entry which will be modified. Cannot be null.modOp
- The type of modification to make to the entry. This
should be one of constant modification types defined. Cannot be null.description
- A text description of the change. Can be null.changeNumber
- Useful if the change came from the change log.
Can be null.changeTime
- Useful if the change came from the change log.
Can be null.
java.lang.NullPointerException
- If either dn or modOp are null.
java.lang.IllegalArgumentException
- If the modOp is not one of the
constants defined in the class.Method Detail |
---|
public boolean isValidModOp(int modOp)
modOp
- The value to test.
public java.lang.String getDN()
public int getModOp()
public java.lang.String getDescription()
public java.lang.Integer getChangeNumber()
public void setChangeNumber(java.lang.Integer changeNumber)
changeNumber
- The new change number.public java.lang.String getChangeTime()
public void setChangeTime(java.lang.String changeTime)
changeTime
- The new change time.public void addModification(java.lang.String attribName, int modOp, java.lang.Object value)
attribName
- The name of the attribute to be modified.modOp
- The modification operation to perform on this attribute.
this should be one of the values defined in the DirContext class.value
- This is the value to add. If it is an array, then it is
recursed and all contained values are added. If value is null then
no value is stored, any nulls in an array are also ignored.public void addModification(javax.naming.directory.ModificationItem mod)
mod
- The modification item to be added. If null, the
method does nothing.public void addModifications(javax.naming.directory.ModificationItem[] mods)
mods
- The modification item to be added. Any null values are
ignored.public javax.naming.directory.ModificationItem[] getModifications()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |