|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.RequestDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator<AddRequest>
org.apache.directory.shared.ldap.codec.decorators.AddRequestDecorator
public final class AddRequestDecorator
A decorator for the AddRequest message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.AddRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
AddRequestDecorator(LdapCodecService codec,
AddRequest decoratedMessage)
Makes a AddRequest a MessageDecorator. |
|
| Method Summary | |
|---|---|
void |
addAttributeType(String type)
Create a new attributeValue |
void |
addAttributeValue(byte[] value)
Add a new value to the current attribute |
void |
addAttributeValue(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 | +--> ... |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the AddRequest message to a PDU. |
int |
getAddRequestLength()
|
List<Integer> |
getAttributesLength()
|
String |
getCurrentAttributeType()
|
Entry |
getEntry()
|
Dn |
getEntryDn()
|
int |
getEntryLength()
|
List<Integer> |
getValuesLength()
|
void |
setAddRequestLength(int addRequestLength)
Stores the encoded length for the AddRequest |
void |
setAttributesLength(List<Integer> attributesLength)
Stores the encoded length for the attributes |
void |
setEntry(Entry entry)
|
void |
setEntryDn(Dn entry)
|
void |
setEntryLength(int entryLength)
Stores the encoded length for the Entry |
void |
setValuesLength(List<Integer> valuesLength)
Stores the encoded length for the values |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator |
|---|
abandon, addAbandonListener, getResponseType, isAbandoned |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator |
|---|
getResultResponse, hasResponse |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.SingleReplyRequest |
|---|
getResponseType |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.ResultResponseRequest |
|---|
getResultResponse |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message |
|---|
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.AbandonableRequest |
|---|
abandon, addAbandonListener, isAbandoned |
| Constructor Detail |
|---|
public AddRequestDecorator(LdapCodecService codec,
AddRequest decoratedMessage)
decoratedMessage - the decorated AddRequest| Method Detail |
|---|
public void setAddRequestLength(int addRequestLength)
addRequestLength - The encoded lengthpublic int getAddRequestLength()
public void setEntryLength(int entryLength)
entryLength - The encoded lengthpublic int getEntryLength()
public void setAttributesLength(List<Integer> attributesLength)
attributesLength - The encoded lengthpublic List<Integer> getAttributesLength()
public void setValuesLength(List<Integer> valuesLength)
valuesLength - The encoded lengthpublic List<Integer> getValuesLength()
public Dn getEntryDn()
getEntryDn in interface AddRequestpublic void setEntryDn(Dn entry)
setEntryDn in interface AddRequestpublic Entry getEntry()
getEntry in interface AddRequestpublic void setEntry(Entry entry)
setEntry in interface AddRequest
public void addAttributeType(String type)
throws LdapException
type - The attribute's name (called 'type' in the grammar)
LdapExceptionpublic String getCurrentAttributeType()
public void addAttributeValue(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 int computeLength()
computeLength in interface Decorator<AddRequest>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
encode in interface Decorator<AddRequest>buffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||