|
||||||||||
| 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<ModifyRequest,ModifyResponse>
org.apache.directory.api.ldap.codec.decorators.ModifyRequestDecorator
public class ModifyRequestDecorator
A decorator for the ModifyRequest 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.ModifyRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
ModifyRequestDecorator(LdapApiService codec,
ModifyRequest decoratedMessage)
Makes a ModifyRequest encodable. |
|
| Method Summary | |
|---|---|
ModifyRequest |
add(Attribute attr)
marks a given attribute for addition in the target entry. |
ModifyRequest |
add(String attributeName,
byte[]... attributeValue)
|
ModifyRequest |
add(String attributeName,
String... attributeValue)
marks a given attribute for addition in the target entry with the given values. |
ModifyRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message. |
void |
addAttributeTypeAndValues(String type)
Add a new attributeTypeAndValue |
void |
addAttributeValue(byte[] value)
Add a new value to the current attribute |
void |
addAttributeValue(String value)
Add a new value to the current attribute |
ModifyRequest |
addControl(Control control)
Adds a control to this Message. |
ModifyRequest |
addModification(Attribute attr,
ModificationOperation modOp)
Add a modification |
ModifyRequest |
addModification(Modification mod)
Adds a ModificationItem to the set of modifications composing this modify request. |
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 | +--> ... |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ModifyRequest message to a PDU. |
List<Integer> |
getChangeLength()
|
int |
getChangesLength()
|
String |
getCurrentAttributeType()
Return the current attribute's type |
List<Integer> |
getModificationLength()
|
Collection<Modification> |
getModifications()
Gets an immutable Collection of modification items representing the atomic changes to perform on the candidate entry to modify. |
int |
getModifyRequestLength()
|
Dn |
getName()
Gets the distinguished name of the entry to be modified by this request. |
List<Integer> |
getValuesLength()
|
ModifyRequest |
remove(Attribute attr)
marks a given attribute for removal from the target entry. |
ModifyRequest |
remove(String attributeName,
byte[]... attributeValue)
|
ModifyRequest |
remove(String attributeName,
String... attributeValue)
marks a given attribute for removal with the given values from the target entry. |
ModifyRequest |
removeControl(Control control)
Deletes a control removing it from this Message. |
ModifyRequest |
removeModification(Modification mod)
Removes a ModificationItem to the set of modifications composing this modify request. |
ModifyRequest |
replace(Attribute attr)
marks a given attribute for replacement in the target entry. |
ModifyRequest |
replace(String attributeName)
|
ModifyRequest |
replace(String attributeName,
byte[]... attributeValue)
|
ModifyRequest |
replace(String attributeName,
String... attributeValue)
marks a given attribute for replacement with the given values in the target entry. |
void |
setChangeLength(List<Integer> changeLength)
|
void |
setChangesLength(int changesLength)
|
void |
setCurrentOperation(int currentOperation)
Store the current operation |
ModifyRequest |
setMessageId(int messageId)
Sets the Message ID for this request |
void |
setModificationLength(List<Integer> modificationLength)
|
void |
setModifyRequestLength(int modifyRequestLength)
|
ModifyRequest |
setName(Dn name)
Sets the distinguished name of the entry to be modified by this request. |
void |
setValuesLength(List<Integer> valuesLength)
|
| 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 ModifyRequestDecorator(LdapApiService codec,
ModifyRequest decoratedMessage)
decoratedMessage - the decorated ModifyRequest| Method Detail |
|---|
public void setModifyRequestLength(int modifyRequestLength)
modifyRequestLength - The encoded ModifyRequest's lengthpublic int getModifyRequestLength()
public void setChangesLength(int changesLength)
changesLength - The encoded Changes lengthpublic int getChangesLength()
public void setChangeLength(List<Integer> changeLength)
public List<Integer> getChangeLength()
public void setModificationLength(List<Integer> modificationLength)
modificationLength - The list of encoded Modification lengthpublic List<Integer> getModificationLength()
public void setValuesLength(List<Integer> valuesLength)
valuesLength - The list of encoded Values lengthpublic List<Integer> getValuesLength()
public void setCurrentOperation(int currentOperation)
currentOperation - The currentOperation to set.public void addAttributeTypeAndValues(String type)
type - The attribute's namepublic String getCurrentAttributeType()
public void addAttributeValue(byte[] value)
throws LdapException
value - The value to add
LdapException
public void addAttributeValue(String value)
throws LdapException
value - The value to add
LdapExceptionpublic Dn getName()
getName in interface ModifyRequestpublic ModifyRequest setName(Dn name)
setName in interface ModifyRequestname - the Dn of the modified entry.
public Collection<Modification> getModifications()
getModifications in interface ModifyRequestpublic ModifyRequest addModification(Modification mod)
addModification in interface ModifyRequestmod - a Modification to add.
public ModifyRequest removeModification(Modification mod)
removeModification in interface ModifyRequestmod - a Modification to remove.
public ModifyRequest remove(String attributeName,
String... attributeValue)
remove in interface ModifyRequestattributeName - name of the attribute to be addedattributeValue - values of the attribute
public ModifyRequest remove(String attributeName,
byte[]... attributeValue)
remove in interface ModifyRequestModifyRequest.remove(String, String...)public ModifyRequest remove(Attribute attr)
remove in interface ModifyRequestattr - the attribute to be added
public ModifyRequest addModification(Attribute attr,
ModificationOperation modOp)
addModification in interface ModifyRequestattr - The attribute to be modifiedmodOp - The operation
public ModifyRequest add(String attributeName,
String... attributeValue)
add in interface ModifyRequestattributeName - name of the attribute to be addedattributeValue - values of the attribute
public ModifyRequest add(String attributeName,
byte[]... attributeValue)
add in interface ModifyRequestModifyRequest.add(String, String...)public ModifyRequest add(Attribute attr)
add in interface ModifyRequestattr - the attribute to be added
public ModifyRequest replace(String attributeName)
replace in interface ModifyRequestModifyRequest.replace(String, String...)
public ModifyRequest replace(String attributeName,
String... attributeValue)
replace in interface ModifyRequestattributeName - name of the attribute to be addedattributeValue - values of the attribute
public ModifyRequest replace(String attributeName,
byte[]... attributeValue)
replace in interface ModifyRequestModifyRequest.replace(String, String...)public ModifyRequest replace(Attribute attr)
replace in interface ModifyRequestattr - the attribute to be added
public ModifyRequest setMessageId(int messageId)
setMessageId in interface MessagesetMessageId in interface ModifyRequestsetMessageId in class MessageDecorator<ModifyRequest>messageId - The message Id
public ModifyRequest addControl(Control control)
throws MessageException
addControl in interface MessageaddControl in interface ModifyRequestaddControl in class MessageDecorator<ModifyRequest>control - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public ModifyRequest addAllControls(Control[] controls)
throws MessageException
addAllControls in interface MessageaddAllControls in interface ModifyRequestaddAllControls in class MessageDecorator<ModifyRequest>controls - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public ModifyRequest removeControl(Control control)
throws MessageException
removeControl in interface MessageremoveControl in interface ModifyRequestremoveControl in class MessageDecorator<ModifyRequest>control - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.public int computeLength()
computeLength in interface Decorator<ModifyRequest>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
0x66 LL
0x04 LL object
0x30 LL modifiations
0x30 LL modification sequence
0x0A 0x01 operation
0x30 LL modification
0x04 LL type
0x31 LL vals
0x04 LL attributeValue
...
0x04 LL attributeValue
...
0x30 LL modification sequence
0x0A 0x01 operation
0x30 LL modification
0x04 LL type
0x31 LL vals
0x04 LL attributeValue
...
0x04 LL attributeValue
encode in interface Decorator<ModifyRequest>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 | |||||||||