|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.Asn1Object
org.apache.directory.shared.ldap.codec.LdapMessage
org.apache.directory.shared.ldap.codec.modify.ModifyRequest
A ModifyRequest Message. Its syntax is : ModifyRequest ::= [APPLICATION 6] SEQUENCE { object LDAPDN, modification SEQUENCE OF SEQUENCE { operation ENUMERATED { add (0), delete (1), replace (2) }, modification AttributeTypeAndValues } } AttributeTypeAndValues ::= SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } AttributeValue ::= OCTET STRING
Field Summary |
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object |
parent |
Constructor Summary | |
ModifyRequest()
Creates a new ModifyRequest object. |
Method Summary | |
void |
addAttributeTypeAndValues(LdapString type)
Add a new attributeTypeAndValue |
void |
addAttributeValue(java.lang.Object value)
Add a new value to the current attribute |
void |
addModification(int operation)
Add a new modification to the list |
int |
computeLength()
Compute the ModifyRequest length ModifyRequest : 0x66 L1 | +--> 0x04 L2 object +--> 0x30 L3 modifications | +--> 0x30 L4-1 modification sequence | | | +--> 0x0A 0x01 (0..2) operation | +--> 0x30 L5-1 modification | | | +--> 0x04 L6-1 type | +--> 0x31 L7-1 vals | | | +--> 0x04 L8-1-1 attributeValue | +--> 0x04 L8-1-2 attributeValue | +--> ... |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the ModifyRequest message to a PDU. |
java.lang.String |
getCurrentAttributeType()
Return the current attribute's type |
int |
getCurrentOperation()
Get the current operation |
int |
getMessageType()
Get the message type |
java.util.ArrayList |
getModifications()
Get the entry's attributes |
java.lang.String |
getObject()
Get the modification's DN |
void |
initModifications()
Initialize the ArrayList for modifications. |
void |
setCurrentOperation(int currentOperation)
Store the current operation |
void |
setObject(javax.naming.Name object)
Set the modification DN. |
java.lang.String |
toString()
Get a String representation of a ModifyRequest |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessage |
addControl, getAbandonRequest, getAddRequest, getAddResponse, getBindRequest, getBindResponse, getCompareRequest, getCompareResponse, getControls, getControls, getCurrentControl, getDelRequest, getDelResponse, getExtendedRequest, getExtendedResponse, getLdapResponse, getMessageId, getMessageTypeName, getModifyDNRequest, getModifyDNResponse, getModifyRequest, getModifyResponse, getSearchRequest, getSearchResultDone, getSearchResultEntry, getSearchResultReference, getUnBindRequest, initControl, setMessageId, setProtocolOP |
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object |
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ModifyRequest()
Method Detail |
public int getMessageType()
getMessageType
in class LdapMessage
public void initModifications()
public java.util.ArrayList getModifications()
public void addModification(int operation)
operation
- The type of operation (add, delete or replace)public void addAttributeTypeAndValues(LdapString type)
type
- The attribute's namepublic void addAttributeValue(java.lang.Object value)
value
- The value to addpublic java.lang.String getCurrentAttributeType()
public java.lang.String getObject()
public void setObject(javax.naming.Name object)
object
- The DN to set.public int getCurrentOperation()
public void setCurrentOperation(int currentOperation)
currentOperation
- The currentOperation to set.public int computeLength()
computeLength
in class LdapMessage
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws org.apache.directory.shared.asn1.codec.EncoderException
encode
in class LdapMessage
buffer
- The buffer where to put the PDU
org.apache.directory.shared.asn1.codec.EncoderException
- If anything goes wrong.public java.lang.String toString()
toString
in class LdapMessage
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |