Package org.ldaptive
Class AddRequest
java.lang.Object
org.ldaptive.AbstractRequestMessage
org.ldaptive.AddRequest
- All Implemented Interfaces:
Request
LDAP add request defined as:
AddRequest ::= [APPLICATION 8] SEQUENCE {
entry LDAPDN,
attributes AttributeList }
AttributeList ::= SEQUENCE OF attribute Attribute
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.ldaptive.AbstractRequestMessage
AbstractRequestMessage.AbstractBuilder<B,T extends AbstractRequestMessage> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LdapAttribute[]Attributes to add to the entry.private StringLDAP DN to add.static final intBER protocol number.Fields inherited from class org.ldaptive.AbstractRequestMessage
logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDefault constructor.AddRequest(String dn, Collection<LdapAttribute> attrs) Creates a new add request.AddRequest(String dn, LdapAttribute... attrs) Creates a new add request. -
Method Summary
Modifier and TypeMethodDescriptionstatic AddRequest.Builderbuilder()Creates a builder for this class.Returns the attributes.getDn()Returns the DN.protected DEREncoder[]getRequestEncoders(int id) Returns the request encoders for this message.toString()Methods inherited from class org.ldaptive.AbstractRequestMessage
encode, getControls, getResponseTimeout, setControls, setResponseTimeout
-
Field Details
-
PROTOCOL_OP
public static final int PROTOCOL_OPBER protocol number.- See Also:
-
ldapDn
LDAP DN to add. -
attributes
Attributes to add to the entry.
-
-
Constructor Details
-
AddRequest
private AddRequest()Default constructor. -
AddRequest
Creates a new add request.- Parameters:
dn- DN to addattrs- to add to the entry
-
AddRequest
Creates a new add request.- Parameters:
dn- DN to addattrs- to add to the entry
-
-
Method Details
-
getDn
Returns the DN.- Returns:
- DN
-
getAttributes
Returns the attributes.- Returns:
- add attributes
-
getRequestEncoders
Description copied from class:AbstractRequestMessageReturns the request encoders for this message.- Specified by:
getRequestEncodersin classAbstractRequestMessage- Parameters:
id- message ID- Returns:
- request encoders
-
toString
- Overrides:
toStringin classAbstractRequestMessage
-
builder
Creates a builder for this class.- Returns:
- new builder
-