|
||||||||||
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.ldap.codec.LdapMessageCodec |
---|
ldapMessageLength |
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 |
protected int |
computeLengthProtocolOp()
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 | +--> ... |
protected void |
encodeProtocolOp(java.nio.ByteBuffer buffer)
Encode the AddRequest message to a PDU. |
java.lang.String |
getCurrentAttributeType()
|
Entry |
getEntry()
Get the entry to be added |
DN |
getEntryDn()
Get the added DN |
MessageTypeEnum |
getMessageType()
Get the message type |
java.lang.String |
getMessageTypeName()
Get the message type Name |
void |
initEntry()
Initialize the Entry. |
void |
setEntry(Entry entry)
Sets the entry. |
void |
setEntryDn(DN 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, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
addLength, encode, 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 MessageTypeEnum getMessageType()
getMessageType
in class LdapMessageCodec
public java.lang.String getMessageTypeName()
getMessageTypeName
in class LdapMessageCodec
public void initEntry()
public Entry getEntry()
public void setEntry(Entry entry)
entry
- the entrypublic void addAttributeType(java.lang.String type) throws LdapException
type
- The attribute's name (called 'type' in the grammar)
LdapException
public 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 DN getEntryDn()
public void setEntryDn(DN entryDn)
entry
- The DN to set.protected int computeLengthProtocolOp()
computeLengthProtocolOp
in class LdapMessageCodec
protected void encodeProtocolOp(java.nio.ByteBuffer buffer) throws EncoderException
encodeProtocolOp
in class LdapMessageCodec
buffer
- The buffer where to put the PDU
EncoderException
public java.lang.String getCurrentAttributeType()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |