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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.core;
028
029
030 import org.opends.server.types.ByteString;
031 import org.opends.server.types.DN;
032
033
034 /**
035 * This abstract class wraps/decorates a given delete operation.
036 * This class will be extended by sub-classes to enhance the
037 * functionnality of the DeleteOperationBasis.
038 */
039 public abstract class DeleteOperationWrapper extends OperationWrapper
040 implements DeleteOperation
041 {
042 // The wrapped operation.
043 DeleteOperation delete;
044
045 /**
046 * Creates a new delete operation based on the provided delete operation.
047 *
048 * @param delete The delete operation to wrap
049 */
050 public DeleteOperationWrapper(DeleteOperation delete)
051 {
052 super(delete);
053 this.delete = delete;
054 }
055
056 /**
057 * {@inheritDoc}
058 */
059 public DN getEntryDN()
060 {
061 return delete.getEntryDN();
062 }
063
064 /**
065 * {@inheritDoc}
066 */
067 public ByteString getRawEntryDN()
068 {
069 return delete.getRawEntryDN();
070 }
071
072 /**
073 * {@inheritDoc}
074 */
075 public void setRawEntryDN(ByteString rawEntryDN)
076 {
077 delete.setRawEntryDN(rawEntryDN);
078 }
079
080 /**
081 * {@inheritDoc}
082 */
083 public final long getChangeNumber()
084 {
085 return delete.getChangeNumber();
086 }
087
088 /**
089 * {@inheritDoc}
090 */
091 public final void setChangeNumber(long changeNumber)
092 {
093 delete.setChangeNumber(changeNumber);
094 }
095
096 /**
097 * {@inheritDoc}
098 */
099 public String toString()
100 {
101 return delete.toString();
102 }
103
104 /**
105 * {@inheritDoc}
106 */
107 public DN getProxiedAuthorizationDN()
108 {
109 return delete.getProxiedAuthorizationDN();
110 }
111
112 /**
113 * {@inheritDoc}
114 */
115 public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
116 {
117 delete.setProxiedAuthorizationDN(proxiedAuthorizationDN);
118 }
119
120 }