|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.LdapMessageCodec
org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec
public class ModifyRequestCodec
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.AbstractAsn1Object |
|---|
parent |
| Constructor Summary | |
|---|---|
ModifyRequestCodec()
Creates a new ModifyRequest object. |
|
| Method Summary | |
|---|---|
void |
addAttributeTypeAndValues(java.lang.String type)
Add a new attributeTypeAndValue |
void |
addAttributeValue(byte[] value)
Add a new value to the current attribute |
void |
addAttributeValue(java.lang.String value)
Add a new value to the current attribute |
void |
addAttributeValue(Value<?> 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.List<Modification> |
getModifications()
Get the entry's attributes |
LdapDN |
getObject()
Get the modification's DN |
void |
initModifications()
Initialize the ArrayList for modifications. |
void |
setCurrentOperation(int currentOperation)
Store the current operation |
void |
setCurrentOperation(ModificationOperation currentOperation)
Store the current operation |
void |
setModifications(java.util.List<Modification> modifications)
sets the modifications |
void |
setObject(LdapDN 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.LdapMessageCodec |
|---|
addControl, getAbandonRequest, getAddRequest, getAddResponse, getBindRequest, getBindResponse, getCompareRequest, getCompareResponse, getControls, getControls, getCurrentControl, getDelRequest, getDelResponse, getExtendedRequest, getExtendedResponse, getIntermediateResponse, getLdapResponse, getMessageId, getMessageTypeName, getModifyDNRequest, getModifyDNResponse, getModifyRequest, getModifyResponse, getSearchRequest, getSearchResultDone, getSearchResultEntry, getSearchResultReference, getUnBindRequest, initControls, setMessageId, setProtocolOP |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ModifyRequestCodec()
| Method Detail |
|---|
public int getMessageType()
getMessageType in class LdapMessageCodecpublic void initModifications()
public java.util.List<Modification> getModifications()
public void addModification(int operation)
operation - The type of operation (add, delete or replace)public void addAttributeTypeAndValues(java.lang.String type)
type - The attribute's namepublic void addAttributeValue(java.lang.String value)
value - The value to addpublic void addAttributeValue(Value<?> value)
value - The value to addpublic void addAttributeValue(byte[] value)
value - The value to addpublic java.lang.String getCurrentAttributeType()
public LdapDN getObject()
public void setObject(LdapDN object)
object - The DN to set.public int getCurrentOperation()
public void setCurrentOperation(int currentOperation)
currentOperation - The currentOperation to set.public void setCurrentOperation(ModificationOperation currentOperation)
currentOperation - The currentOperation to set.public void setModifications(java.util.List<Modification> modifications)
modifications - the list of modificationspublic int computeLength()
computeLength in interface Asn1ObjectcomputeLength in class LdapMessageCodec
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws EncoderException
encode in interface Asn1Objectencode in class LdapMessageCodecbuffer - The buffer where to put the PDU
EncoderException - If anything goes wrong.public java.lang.String toString()
toString in class LdapMessageCodec
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||