001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 * Portions Copyright 2013-2016 ForgeRock AS.
016 */
017package org.opends.server.core;
018
019import java.util.List;
020
021import org.opends.server.types.*;
022import org.forgerock.opendj.ldap.ByteString;
023import org.forgerock.opendj.ldap.DN;
024import org.forgerock.opendj.ldap.RDN;
025
026/**
027 * This abstract class wraps/decorates a given moddn operation.
028 * This class will be extended by sub-classes to enhance the
029 * functionality of the ModifyDNOperationBasis.
030 */
031public abstract class ModifyDNOperationWrapper extends
032    OperationWrapper<ModifyDNOperation> implements ModifyDNOperation
033{
034  /**
035   * Creates a new moddn operation based on the provided moddn operation.
036   *
037   * @param modifyDN The moddn operation to wrap
038   */
039  public ModifyDNOperationWrapper(ModifyDNOperation modifyDN)
040  {
041    super(modifyDN);
042  }
043
044  @Override
045  public void addModification(Modification modification) {
046    getOperation().addModification(modification);
047  }
048
049  @Override
050  public boolean deleteOldRDN() {
051    return getOperation().deleteOldRDN();
052  }
053
054  @Override
055  public DN getEntryDN() {
056    return getOperation().getEntryDN();
057  }
058
059  @Override
060  public List<Modification> getModifications() {
061    return getOperation().getModifications();
062  }
063
064  @Override
065  public RDN getNewRDN() {
066    return getOperation().getNewRDN();
067  }
068
069  @Override
070  public DN getNewSuperior() {
071    return getOperation().getNewSuperior();
072  }
073
074  @Override
075  public Entry getOriginalEntry() {
076    return getOperation().getOriginalEntry();
077  }
078
079  @Override
080  public ByteString getRawEntryDN() {
081    return getOperation().getRawEntryDN();
082  }
083
084  @Override
085  public ByteString getRawNewRDN() {
086    return getOperation().getRawNewRDN();
087  }
088
089  @Override
090  public ByteString getRawNewSuperior() {
091    return getOperation().getRawNewSuperior();
092  }
093
094  @Override
095  public Entry getUpdatedEntry() {
096    return getOperation().getUpdatedEntry();
097  }
098
099  @Override
100  public void setDeleteOldRDN(boolean deleteOldRDN) {
101    getOperation().setDeleteOldRDN(deleteOldRDN);
102  }
103
104  @Override
105  public void setRawEntryDN(ByteString rawEntryDN) {
106    getOperation().setRawEntryDN(rawEntryDN);
107  }
108
109  @Override
110  public void setRawNewRDN(ByteString rawNewRDN) {
111    getOperation().setRawNewRDN(rawNewRDN);
112  }
113
114  @Override
115  public void setRawNewSuperior(ByteString rawNewSuperior) {
116    getOperation().setRawNewSuperior(rawNewSuperior);
117  }
118
119  @Override
120  public DN getNewDN()
121  {
122    return getOperation().getNewDN();
123  }
124}