Record Class AddRequest
java.lang.Object
java.lang.Record
org.forgerock.opendj.ldap.messages.AddRequest
- Record Components:
entry- the entry to be added.controls- theListcontaining the controls.
- All Implemented Interfaces:
ProtocolOp,Request,ChangeRecord
public record AddRequest(Entry entry, List<Control> controls)
extends Record
implements ChangeRecord
The Add operation allows a client to request the addition of an entry into
the Directory.
The RDN attribute(s) may or may not be included in the Add request.
NO-USER-MODIFICATION attributes such as the createTimestamp or
creatorsName attributes must not be included, since the server
maintains these automatically.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.forgerock.opendj.ldap.messages.Request
Request.RequestType -
Constructor Summary
ConstructorsConstructorDescriptionAddRequest(Entry entry, List<Control> controls) Create newAddRequestwith the entry to be added and theListcontaining the controls. -
Method Summary
Modifier and TypeMethodDescription<R,P, E extends Exception>
Raccept(RequestVisitor<R, P, E> v, P p) Applies aRequestVisitorto thisRequest.controls()Returns the value of thecontrolsrecord component.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()Returns the type of this request to avoid expensiveinstanceofchecks.final inthashCode()Returns a hash code value for this object.name()Returns the distinguished name of the entry being modified by thisChangeRecord.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.forgerock.opendj.ldap.messages.ProtocolOp
addControl, addControls, containsControl, getControl, getControl, removeControls
-
Constructor Details
-
AddRequest
Create newAddRequestwith the entry to be added and theListcontaining the controls.
-
-
Method Details
-
accept
Description copied from interface:RequestApplies aRequestVisitorto thisRequest.- Specified by:
acceptin interfaceRequest- Type Parameters:
R- The return type of the visitor's methods.P- The type of the additional parameters to the visitor's methods.E- The type of the exception thrown by the visitor method if it fails, orNeverThrowsExceptionif the visitor cannot fail.- Parameters:
v- The request visitor.p- Optional additional visitor parameter.- Returns:
- A result as specified by the visitor.
- Throws:
E- If the visitor failed.
-
name
Description copied from interface:ChangeRecordReturns the distinguished name of the entry being modified by thisChangeRecord.- Specified by:
namein interfaceChangeRecord- Returns:
- The distinguished name of the entry being modified.
-
getType
Description copied from interface:RequestReturns the type of this request to avoid expensiveinstanceofchecks. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-
controls
Returns the value of thecontrolsrecord component.- Specified by:
controlsin interfaceProtocolOp- Returns:
- the value of the
controlsrecord component
-