Package org.ldaptive
Class ModifyDnRequest
- java.lang.Object
-
- org.ldaptive.AbstractRequestMessage
-
- org.ldaptive.ModifyDnRequest
-
- All Implemented Interfaces:
Request
public class ModifyDnRequest extends AbstractRequestMessage
LDAP modify DN request defined as:ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { entry LDAPDN, newrdn RelativeLDAPDN, deleteoldrdn BOOLEAN, newSuperior [0] LDAPDN OPTIONAL }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModifyDnRequest.Builder
Modify DN request builder.-
Nested classes/interfaces inherited from class org.ldaptive.AbstractRequestMessage
AbstractRequestMessage.AbstractBuilder<B,T extends AbstractRequestMessage>
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
deleteOldRDn
Whether to delete the old RDN attribute.private String
newModifyRDn
New DN.private String
newSuperiorDn
New superior DN.private String
oldModifyDn
DN to modify.static int
PROTOCOL_OP
BER protocol number.-
Fields inherited from class org.ldaptive.AbstractRequestMessage
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ModifyDnRequest()
Default constructor.ModifyDnRequest(String oldDN, String newRDN, boolean delete)
Creates a new modify DN request.ModifyDnRequest(String oldDN, String newRDN, boolean delete, String newSuperior)
Creates a new modify DN request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModifyDnRequest.Builder
builder()
Creates a builder for this class.String
getNewRDn()
Returns the new RDN.String
getNewSuperiorDn()
Returns the new superior DN.String
getOldDn()
Returns the old DN.protected DEREncoder[]
getRequestEncoders(int id)
Returns the request encoders for this message.boolean
isDeleteOldRDn()
Whether to delete the old RDN.String
toString()
-
Methods inherited from class org.ldaptive.AbstractRequestMessage
encode, getControls, getResponseTimeout, setControls, setResponseTimeout
-
-
-
-
Field Detail
-
PROTOCOL_OP
public static final int PROTOCOL_OP
BER protocol number.- See Also:
- Constant Field Values
-
oldModifyDn
private String oldModifyDn
DN to modify.
-
newModifyRDn
private String newModifyRDn
New DN.
-
deleteOldRDn
private boolean deleteOldRDn
Whether to delete the old RDN attribute.
-
newSuperiorDn
private String newSuperiorDn
New superior DN.
-
-
Constructor Detail
-
ModifyDnRequest
private ModifyDnRequest()
Default constructor.
-
ModifyDnRequest
public ModifyDnRequest(String oldDN, String newRDN, boolean delete)
Creates a new modify DN request.- Parameters:
oldDN
- old modify DNnewRDN
- new modify DNdelete
- whether to delete the old RDN attribute
-
-
Method Detail
-
getOldDn
public String getOldDn()
Returns the old DN.- Returns:
- old DN
-
getNewRDn
public String getNewRDn()
Returns the new RDN.- Returns:
- new RDN
-
isDeleteOldRDn
public boolean isDeleteOldRDn()
Whether to delete the old RDN.- Returns:
- whether to delete the old RDN
-
getNewSuperiorDn
public String getNewSuperiorDn()
Returns the new superior DN.- Returns:
- new superior DN
-
getRequestEncoders
protected DEREncoder[] getRequestEncoders(int id)
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
public String toString()
- Overrides:
toString
in classAbstractRequestMessage
-
builder
public static ModifyDnRequest.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-