|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.codec.api.MessageDecorator<M>
org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M,R>
org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<AddRequest,AddResponse>
org.apache.directory.api.ldap.codec.decorators.AddRequestDecorator
public final class AddRequestDecorator
A decorator for the AddRequest message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.api.ldap.model.message.AddRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
AddRequestDecorator(LdapApiService codec,
AddRequest decoratedMessage)
Makes a AddRequest a MessageDecorator. |
|
| Method Summary | |
|---|---|
AddRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message. |
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 |
AddRequest |
addControl(Control control)
Adds a control to this Message. |
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()
Gets the entry to add. |
Dn |
getEntryDn()
Gets the distinguished name of the entry to add. |
int |
getEntryLength()
|
List<Integer> |
getValuesLength()
|
AddRequest |
removeControl(Control control)
Deletes a control removing it from this Message. |
void |
setAddRequestLength(int addRequestLength)
Stores the encoded length for the AddRequest |
void |
setAttributesLength(List<Integer> attributesLength)
Stores the encoded length for the attributes |
AddRequest |
setEntry(Entry entry)
Sets the Entry to add. |
AddRequest |
setEntryDn(Dn entry)
Sets the distinguished name of the entry to add. |
void |
setEntryLength(int entryLength)
Stores the encoded length for the Entry |
AddRequest |
setMessageId(int messageId)
Sets the Message ID for this request |
void |
setValuesLength(List<Integer> valuesLength)
Stores the encoded length for the values |
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator |
|---|
abandon, addAbandonListener, getResponseType, isAbandoned |
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator |
|---|
getResultResponse, hasResponse |
| Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, 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.api.ldap.model.message.SingleReplyRequest |
|---|
getResponseType |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest |
|---|
getResultResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Message |
|---|
get, getControl, getControls, getMessageId, getType, hasControl, put |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest |
|---|
abandon, addAbandonListener, isAbandoned |
| Constructor Detail |
|---|
public AddRequestDecorator(LdapApiService 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 AddRequest setMessageId(int messageId)
setMessageId in interface AddRequestsetMessageId in interface MessagesetMessageId in class MessageDecorator<AddRequest>messageId - The message Id
public AddRequest addControl(Control control)
throws MessageException
addControl in interface AddRequestaddControl in interface MessageaddControl in class MessageDecorator<AddRequest>control - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public AddRequest addAllControls(Control[] controls)
throws MessageException
addAllControls in interface AddRequestaddAllControls in interface MessageaddAllControls in class MessageDecorator<AddRequest>controls - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public AddRequest removeControl(Control control)
throws MessageException
removeControl in interface AddRequestremoveControl in interface MessageremoveControl in class MessageDecorator<AddRequest>control - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.public Dn getEntryDn()
getEntryDn in interface AddRequestpublic AddRequest setEntryDn(Dn entry)
setEntryDn in interface AddRequestentry - the Dn of the added entry.
public Entry getEntry()
getEntry in interface AddRequestpublic AddRequest setEntry(Entry entry)
setEntry in interface AddRequestentry - the added Entry
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)
throws LdapException
value - The value to add
LdapException
public void addAttributeValue(Value<?> value)
throws LdapException
value - The value to add
LdapException
public void addAttributeValue(byte[] value)
throws LdapException
value - The value to add
LdapExceptionpublic 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 | |||||||||