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