|
||||||||||
| 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.add.AddRequestCodec
public class AddRequestCodec
An AddRequest Message. Its syntax is : AddRequest ::= [APPLICATION 8] SEQUENCE { entry LDAPDN, attributes AttributeList } AttributeList ::= SEQUENCE OF 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 | |
|---|---|
AddRequestCodec()
Creates a new AddRequest object. |
|
| Method Summary | |
|---|---|
void |
addAttributeType(java.lang.String type)
Create a new attributeValue |
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 |
int |
computeLength()
Compute the AddRequest length AddRequest : 0x68 L1 | +--> 0x04 L2 entry +--> 0x30 L3 (attributes) | +--> 0x30 L4-1 (attribute) | | | +--> 0x04 L5-1 type | +--> 0x31 L6-1 (values) | | | +--> 0x04 L7-1-1 value | +--> ... |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the AddRequest message to a PDU. |
java.lang.String |
getCurrentAttributeType()
|
Entry |
getEntry()
Get the entry to be added |
LdapDN |
getEntryDn()
Get the added DN |
int |
getMessageType()
Get the message type |
void |
initEntry()
Initialize the Entry. |
void |
setEntry(Entry entry)
Sets the entry. |
void |
setEntryDn(LdapDN entryDn)
Set the added DN. |
java.lang.String |
toString()
Return a String representing an AddRequest |
| 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 AddRequestCodec()
| Method Detail |
|---|
public int getMessageType()
getMessageType in class LdapMessageCodecpublic void initEntry()
public Entry getEntry()
public void setEntry(Entry entry)
entry - the entry
public void addAttributeType(java.lang.String type)
throws javax.naming.NamingException
type - The attribute's name (called 'type' in the grammar)
javax.naming.NamingExceptionpublic 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 LdapDN getEntryDn()
public void setEntryDn(LdapDN entryDn)
entry - The DN to set.public 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 LdapMessageCodecpublic java.lang.String getCurrentAttributeType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||