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 String
LDAP DN to add.static final int
BER protocol number.Fields inherited from class org.ldaptive.AbstractRequestMessage
logger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Default 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.Builder
builder()
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, setControls
-
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:AbstractRequestMessage
Returns the request encoders for this message.- Specified by:
getRequestEncoders
in classAbstractRequestMessage
- Parameters:
id
- message ID- Returns:
- request encoders
-
toString
- Overrides:
toString
in classAbstractRequestMessage
-
builder
Creates a builder for this class.- Returns:
- new builder
-