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.server.core.event;
021
022
023 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
024 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
025 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
026 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
027 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
028 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
029
030
031 /**
032 * A listener which is notified of changes to the directory service.
033 *
034 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
035 * @version $Rev$, $Date$
036 */
037 public interface DirectoryListener
038 {
039 /**
040 * Called when an entry has been added.
041 *
042 * @param opContext the add operation context responsible for the change
043 */
044 void entryAdded( AddOperationContext opContext );
045
046
047 /**
048 * Called when an entry has been deleted.
049 *
050 * @param opContext the delete operation context responsible for the change
051 */
052 void entryDeleted( DeleteOperationContext opContext );
053
054
055 /**
056 * Called when an entry has been modified.
057 *
058 * @param opContext the modify operation context responsible for the change
059 */
060 void entryModified( ModifyOperationContext opContext );
061
062
063 /**
064 * Called when an entry has been renamed.
065 *
066 * @param opContext the rename operation context responsible for the change
067 */
068 void entryRenamed( RenameOperationContext opContext );
069
070
071 /**
072 * Called when an entry is moved.
073 *
074 * @param opContext the move operation context responsible for the change
075 */
076 void entryMoved( MoveOperationContext opContext );
077
078
079 /**
080 * Called when an entry is moved and renamed at the same time.
081 *
082 * @param opContext the move/rename operation context responsible for the change
083 */
084 void entryMovedAndRenamed( MoveAndRenameOperationContext opContext );
085 }