View Javadoc

1   /*
2    *   Licensed to the Apache Software Foundation (ASF) under one
3    *   or more contributor license agreements.  See the NOTICE file
4    *   distributed with this work for additional information
5    *   regarding copyright ownership.  The ASF licenses this file
6    *   to you under the Apache License, Version 2.0 (the
7    *   "License"); you may not use this file except in compliance
8    *   with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *   Unless required by applicable law or agreed to in writing,
13   *   software distributed under the License is distributed on an
14   *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *   KIND, either express or implied.  See the License for the
16   *   specific language governing permissions and limitations
17   *   under the License.
18   *
19   */
20  package org.apache.directory.server.core.event;
21  
22  
23  import org.apache.directory.server.core.interceptor.context.AddOperationContext;
24  import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
25  import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
26  import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
27  import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
28  import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
29  
30  
31  /**
32   * A listener which is notified of changes to the directory service.
33   *
34   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
35   * @version $Rev$, $Date$
36   */
37  public interface DirectoryListener
38  {
39      /**
40       * Called when an entry has been added.
41       *
42       * @param opContext the add operation context responsible for the change
43       */
44      void entryAdded( AddOperationContext opContext ); 
45      
46      
47      /**
48       * Called when an entry has been deleted.
49       *
50       * @param opContext the delete operation context responsible for the change
51       */
52      void entryDeleted( DeleteOperationContext opContext );
53      
54      
55      /**
56       * Called when an entry has been modified.
57       *
58       * @param opContext the modify operation context responsible for the change
59       */
60      void entryModified( ModifyOperationContext opContext );
61      
62      
63      /**
64       * Called when an entry has been renamed.
65       *
66       * @param opContext the rename operation context responsible for the change
67       */
68      void entryRenamed( RenameOperationContext opContext );
69      
70      
71      /**
72       * Called when an entry is moved.
73       *
74       * @param opContext the move operation context responsible for the change
75       */
76      void entryMoved( MoveOperationContext opContext );
77      
78      
79      /**
80       * Called when an entry is moved and renamed at the same time.
81       *
82       * @param opContext the move/rename operation context responsible for the change
83       */
84      void entryMovedAndRenamed( MoveAndRenameOperationContext opContext );
85  }