|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.Asn1Object
org.apache.directory.shared.ldap.codec.LdapMessage
org.apache.directory.shared.ldap.codec.add.AddRequest
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.Asn1Object |
parent |
Constructor Summary | |
AddRequest()
Creates a new AddRequest object. |
Method Summary | |
void |
addAttributeType(LdapString type)
Create a new attributeValue |
void |
addAttributeValue(java.lang.Object 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. |
javax.naming.directory.Attributes |
getAttributes()
Get the entry's attributes to be added |
java.lang.String |
getCurrentAttributeType()
|
java.lang.String |
getEntry()
Get the added DN |
int |
getMessageType()
Get the message type |
void |
initAttributes()
Initialize the ArrayList for attributes. |
void |
setEntry(javax.naming.Name entry)
Set the added DN. |
java.lang.String |
toString()
Return a String representing an AddRequest |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessage |
addControl, getAbandonRequest, getAddRequest, getAddResponse, getBindRequest, getBindResponse, getCompareRequest, getCompareResponse, getControls, getControls, getCurrentControl, getDelRequest, getDelResponse, getExtendedRequest, getExtendedResponse, getLdapResponse, getMessageId, getMessageTypeName, getModifyDNRequest, getModifyDNResponse, getModifyRequest, getModifyResponse, getSearchRequest, getSearchResultDone, getSearchResultEntry, getSearchResultReference, getUnBindRequest, initControl, setMessageId, setProtocolOP |
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object |
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AddRequest()
Method Detail |
public int getMessageType()
getMessageType
in class LdapMessage
public void initAttributes()
public javax.naming.directory.Attributes getAttributes()
public void addAttributeType(LdapString type)
type
- The attribute's name (called 'type' in the grammar)public void addAttributeValue(java.lang.Object value)
value
- The value to be addedpublic java.lang.String getEntry()
public void setEntry(javax.naming.Name entry)
entry
- The entry to set.public int computeLength()
computeLength
in class LdapMessage
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws org.apache.directory.shared.asn1.codec.EncoderException
encode
in class LdapMessage
buffer
- The buffer where to put the PDU
org.apache.directory.shared.asn1.codec.EncoderException
- If anything goes wrong.public java.lang.String toString()
toString
in class LdapMessage
public java.lang.String getCurrentAttributeType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |