001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020 package org.apache.directory.shared.ldap.entry;
021
022 import java.io.Externalizable;
023
024 /**
025 * An internal interface for a ModificationItem. The name has been
026 * chosen so that it does not conflict with @see ModificationItem
027 *
028 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
029 * @version $Rev$, $Date$
030 */
031 public interface Modification extends Cloneable, Externalizable
032 {
033 /**
034 * @return the operation
035 */
036 ModificationOperation getOperation();
037
038
039 /**
040 * Store the modification operation
041 *
042 * @param operation The DirContext value to assign
043 */
044 void setOperation( int operation );
045
046
047 /**
048 * Store the modification operation
049 *
050 * @param operation The ModificationOperation value to assign
051 */
052 void setOperation( ModificationOperation operation );
053
054
055 /**
056 * @return the attribute containing the modifications
057 */
058 EntryAttribute getAttribute();
059
060
061 /**
062 * Set the attribute's modification
063 *
064 * @param attribute The modified attribute
065 */
066 void setAttribute( EntryAttribute attribute );
067
068
069 /**
070 * The clone operation
071 *
072 * @return a clone of the current modification
073 */
074 Modification clone();
075 }