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.interceptor;
21  
22  
23  import java.util.Iterator;
24  
25  import org.apache.directory.server.core.entry.ClonedServerEntry;
26  import org.apache.directory.server.core.filtering.EntryFilteringCursor;
27  import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
28  import org.apache.directory.server.core.interceptor.context.AddOperationContext;
29  import org.apache.directory.server.core.interceptor.context.BindOperationContext;
30  import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
31  import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
32  import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
33  import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
34  import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
35  import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
36  import org.apache.directory.server.core.interceptor.context.ListOperationContext;
37  import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
38  import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
39  import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
40  import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
41  import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
42  import org.apache.directory.server.core.interceptor.context.RemoveContextPartitionOperationContext;
43  import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
44  import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
45  import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
46  import org.apache.directory.server.core.partition.PartitionNexus;
47  import org.apache.directory.shared.ldap.name.LdapDN;
48  
49  
50  /**
51   * Represents the next {@link Interceptor} in the interceptor chain.
52   *
53   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
54   * @version $Rev: 659905 $, $Date: 2008-05-25 05:37:28 +0200 (So, 25 Mai 2008) $
55   * @see Interceptor
56   * @see InterceptorChain
57   */
58  public interface NextInterceptor
59  {
60      /**
61       * Calls the next interceptor's {@link Interceptor#compare( NextInterceptor, CompareOperationContext )}.
62       */
63      boolean compare( CompareOperationContext opContext ) throws Exception;
64  
65  
66      /**
67       * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, GetRootDSEOperationContext )}.
68       */
69      ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws Exception;
70  
71  
72      /**
73       * Calls the next interceptor's {@link Interceptor#getMatchedName( NextInterceptor, GetMatchedNameOperationContext )}.
74       */
75      LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception;
76  
77  
78      /**
79       * Calls the next interceptor's {@link Interceptor#getSuffix( NextInterceptor, GetSuffixOperationContext )}.
80       */
81      LdapDN getSuffix( GetSuffixOperationContext opContext ) throws Exception;
82  
83  
84      /**
85       * Calls the next interceptor's {@link Interceptor#listSuffixes( NextInterceptor, ListSuffixOperationContext )}.
86       */
87      Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception;
88  
89  
90      /**
91       * Calls the next interceptor's {@link PartitionNexus#addContextPartition( AddContextPartitionOperationContext )}.
92       */
93      void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception;
94  
95  
96      /**
97       * Calls the next interceptor's {@link PartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext )}.
98       */
99      void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws Exception;
100 
101 
102     /**
103      * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, DeleteOperationContext )}.
104      */
105     void delete( DeleteOperationContext opContext ) throws Exception;
106 
107 
108     /**
109      * Calls the next interceptor's {@link Interceptor#add( NextInterceptor, AddOperationContext )}.
110      */
111     void add( AddOperationContext opContext ) throws Exception;
112 
113 
114     /**
115      * Calls the next interceptor's {@link Interceptor#modify( NextInterceptor, ModifyOperationContext )}.
116      */
117     void modify( ModifyOperationContext opContext ) throws Exception;
118 
119     /**
120      * Calls the next interceptor's {@link Interceptor#list( NextInterceptor, ListOperationContext )}.
121      */
122     EntryFilteringCursor list( ListOperationContext opContext ) throws Exception;
123 
124 
125     /**
126      * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext opContext )}.
127      */
128     EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception;
129 
130 
131     /**
132      * Calls the next interceptor's {@link Interceptor#lookup( NextInterceptor, LookupOperationContext )}.
133      */
134     ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception;
135 
136 
137     /**
138      * Calls the next interceptor's {@link Interceptor#hasEntry( NextInterceptor, EntryOperationContext )}.
139      */
140     boolean hasEntry( EntryOperationContext opContext ) throws Exception;
141 
142 
143     /**
144      * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
145      */
146     void rename( RenameOperationContext opContext ) throws Exception;
147 
148 
149     /**
150      * Calls the next interceptor's {@link Interceptor#move( NextInterceptor, MoveOperationContext )}.
151      */
152     void move( MoveOperationContext opContext ) throws Exception;
153 
154 
155     /**
156      * Calls the next interceptor's {@link Interceptor#moveAndRename( NextInterceptor, MoveAndRenameOperationContext )}.
157      */
158     void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception;
159 
160 
161     /**
162      * Calls the next interceptor's {@link Interceptor#bind( NextInterceptor, BindOperationContext )}
163      */
164     void bind( BindOperationContext opContext ) throws Exception;
165 
166     /**
167      * Calls the next interceptor's {@link Interceptor#unbind( NextInterceptor, UnbindOperationContext )}
168      */
169     void unbind( UnbindOperationContext opContext ) throws Exception;
170 }