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 classModifyDnRequest.BuilderModify 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 booleandeleteOldRDnWhether to delete the old RDN attribute.private StringnewModifyRDnNew DN.private StringnewSuperiorDnNew superior DN.private StringoldModifyDnDN to modify.static intPROTOCOL_OPBER protocol number.-
Fields inherited from class org.ldaptive.AbstractRequestMessage
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description privateModifyDnRequest()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.Builderbuilder()Creates a builder for this class.StringgetNewRDn()Returns the new RDN.StringgetNewSuperiorDn()Returns the new superior DN.StringgetOldDn()Returns the old DN.protected DEREncoder[]getRequestEncoders(int id)Returns the request encoders for this message.booleanisDeleteOldRDn()Whether to delete the old RDN.StringtoString()-
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:AbstractRequestMessageReturns the request encoders for this message.- Specified by:
getRequestEncodersin classAbstractRequestMessage- Parameters:
id- message ID- Returns:
- request encoders
-
toString
public String toString()
- Overrides:
toStringin classAbstractRequestMessage
-
builder
public static ModifyDnRequest.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-