netscape.ldap.client.opers

Class JDAPAddRequest

Implemented Interfaces:
JDAPProtocolOp

public class JDAPAddRequest
extends JDAPBaseDNRequest
implements JDAPProtocolOp

This class implements the add request. This object is sent to the ldap server. See RFC 1777.
 AddRequest ::= [APPLICATION 8] SEQUENCE {
   entry LDAPDN,
   attrs SEQUENCE OF SEQUENCE {
     type AttributeType,
     values SET OF AttributeValue
   }
 }
 
Version:
1.0

Field Summary

protected LDAPAttribute[]
m_attrs
protected String
m_dn
Internal variables

Fields inherited from interface netscape.ldap.client.opers.JDAPProtocolOp

ABANDON_REQUEST, ADD_REQUEST, ADD_RESPONSE, BIND_REQUEST, BIND_RESPONSE, COMPARE_REQUEST, COMPARE_RESPONSE, DEL_REQUEST, DEL_RESPONSE, EXTENDED_REQUEST, EXTENDED_RESPONSE, MODIFY_RDN_REQUEST, MODIFY_RDN_RESPONSE, MODIFY_REQUEST, MODIFY_RESPONSE, SEARCH_REQUEST, SEARCH_RESPONSE, SEARCH_RESULT, SEARCH_RESULT_REFERENCE, UNBIND_REQUEST

Constructor Summary

JDAPAddRequest(String dn, attrs[] )
Constructs add request.

Method Summary

BERElement
getBERElement()
Gets the ber representation of add request.
String
getBaseDN()
Gets the base dn component.
String
getParamString()
Retrieves the string representation of add request parameters.
int
getType()
Retrieves protocol operation type.
void
setBaseDN(String basedn)
Sets the base dn component.
String
toString()
Retrieves the string representation of add request.

Methods inherited from class netscape.ldap.client.opers.JDAPBaseDNRequest

getBaseDN, setBaseDN

Field Details

m_attrs

protected LDAPAttribute[] m_attrs

m_dn

protected String m_dn
Internal variables

Constructor Details

JDAPAddRequest

public JDAPAddRequest(String dn,
                      attrs[] )
Constructs add request.
Parameters:
dn - distinguished name of adding entry

Method Details

getBERElement

public BERElement getBERElement()
Gets the ber representation of add request.
Specified by:
getBERElement in interface JDAPProtocolOp
Returns:
ber representation of request

getBaseDN

public String getBaseDN()
Gets the base dn component.
Overrides:
getBaseDN in interface JDAPBaseDNRequest
Returns:
base dn

getParamString

public String getParamString()
Retrieves the string representation of add request parameters.
Returns:
string representation of add request parameters

getType

public int getType()
Retrieves protocol operation type.
Specified by:
getType in interface JDAPProtocolOp
Returns:
protcol type

setBaseDN

public void setBaseDN(String basedn)
Sets the base dn component.
Overrides:
setBaseDN in interface JDAPBaseDNRequest
Parameters:
basedn - base dn

toString

public String toString()
Retrieves the string representation of add request.
Specified by:
toString in interface JDAPProtocolOp
Returns:
string representation of add request