| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.RDN; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | ModifyDNRequestImpl(final DN name, final RDN newRDN) |
| | | throws NullPointerException |
| | | { |
| | | this.name = name; |
| | | this.newRDN = newRDN; |
| | |
| | | * If {@code modifyDNRequest} was {@code null} . |
| | | */ |
| | | ModifyDNRequestImpl(final ModifyDNRequest modifyDNRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(modifyDNRequest); |
| | | this.name = modifyDNRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequestImpl setDeleteOldRDN(final boolean deleteOldRDN) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.deleteOldRDN = deleteOldRDN; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = DN.valueOf(dn); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewRDN(final RDN rdn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(rdn); |
| | | this.newRDN = rdn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewRDN(final String rdn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(rdn); |
| | | this.newRDN = RDN.valueOf(rdn); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewSuperior(final DN dn) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.newSuperior = dn; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewSuperior(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException |
| | | { |
| | | this.newSuperior = (dn != null) ? DN.valueOf(dn) : null; |
| | | return this; |