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 /** 036 * Creates a new moddn operation based on the provided moddn operation. 037 * 038 * @param modifyDN The moddn operation to wrap 039 */ 040 public ModifyDNOperationWrapper(ModifyDNOperation modifyDN) 041 { 042 super(modifyDN); 043 } 044 045 /** {@inheritDoc} */ 046 @Override 047 public void addModification(Modification modification) { 048 getOperation().addModification(modification); 049 } 050 051 /** {@inheritDoc} */ 052 @Override 053 public boolean deleteOldRDN() { 054 return getOperation().deleteOldRDN(); 055 } 056 057 /** {@inheritDoc} */ 058 @Override 059 public DN getEntryDN() { 060 return getOperation().getEntryDN(); 061 } 062 063 /** {@inheritDoc} */ 064 @Override 065 public List<Modification> getModifications() { 066 return getOperation().getModifications(); 067 } 068 069 /** {@inheritDoc} */ 070 @Override 071 public RDN getNewRDN() { 072 return getOperation().getNewRDN(); 073 } 074 075 /** {@inheritDoc} */ 076 @Override 077 public DN getNewSuperior() { 078 return getOperation().getNewSuperior(); 079 } 080 081 /** {@inheritDoc} */ 082 @Override 083 public Entry getOriginalEntry() { 084 return getOperation().getOriginalEntry(); 085 } 086 087 /** {@inheritDoc} */ 088 @Override 089 public ByteString getRawEntryDN() { 090 return getOperation().getRawEntryDN(); 091 } 092 093 /** {@inheritDoc} */ 094 @Override 095 public ByteString getRawNewRDN() { 096 return getOperation().getRawNewRDN(); 097 } 098 099 /** {@inheritDoc} */ 100 @Override 101 public ByteString getRawNewSuperior() { 102 return getOperation().getRawNewSuperior(); 103 } 104 105 /** {@inheritDoc} */ 106 @Override 107 public Entry getUpdatedEntry() { 108 return getOperation().getUpdatedEntry(); 109 } 110 111 /** {@inheritDoc} */ 112 @Override 113 public void setDeleteOldRDN(boolean deleteOldRDN) { 114 getOperation().setDeleteOldRDN(deleteOldRDN); 115 } 116 117 /** {@inheritDoc} */ 118 @Override 119 public void setRawEntryDN(ByteString rawEntryDN) { 120 getOperation().setRawEntryDN(rawEntryDN); 121 } 122 123 /** {@inheritDoc} */ 124 @Override 125 public void setRawNewRDN(ByteString rawNewRDN) { 126 getOperation().setRawNewRDN(rawNewRDN); 127 } 128 129 /** {@inheritDoc} */ 130 @Override 131 public void setRawNewSuperior(ByteString rawNewSuperior) { 132 getOperation().setRawNewSuperior(rawNewSuperior); 133 } 134 135 /** {@inheritDoc} */ 136 @Override 137 public DN getNewDN() 138 { 139 return getOperation().getNewDN(); 140 } 141 142}