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.interceptor;
021
022
023 import java.util.Set;
024
025 import org.apache.directory.server.core.entry.ClonedServerEntry;
026 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
027 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
028 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
029 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
030 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
031 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
032 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
033 import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
034 import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
035 import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
036 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
037 import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
038 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
039 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
040 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
041 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
042 import org.apache.directory.server.core.interceptor.context.RemoveContextPartitionOperationContext;
043 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
044 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
045 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
046 import org.apache.directory.shared.ldap.name.DN;
047
048
049 /**
050 * Represents the next {@link Interceptor} in the interceptor chain.
051 *
052 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
053 * @version $Rev: 918766 $, $Date: 2010-03-04 01:25:11 +0200 (Thu, 04 Mar 2010) $
054 * @see Interceptor
055 * @see InterceptorChain
056 */
057 public interface NextInterceptor
058 {
059 /**
060 * Calls the next interceptor's {@link Interceptor#compare( NextInterceptor, CompareOperationContext )}.
061 */
062 boolean compare( CompareOperationContext opContext ) throws Exception;
063
064
065 /**
066 * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, GetRootDSEOperationContext )}.
067 */
068 ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws Exception;
069
070
071 /**
072 * Calls the next interceptor's {@link Interceptor#getMatchedName( NextInterceptor, GetMatchedNameOperationContext )}.
073 */
074 DN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception;
075
076
077 /**
078 * Calls the next interceptor's {@link Interceptor#getSuffix( NextInterceptor, GetSuffixOperationContext )}.
079 */
080 DN getSuffix( GetSuffixOperationContext opContext ) throws Exception;
081
082
083 /**
084 * Calls the next interceptor's {@link Interceptor#listSuffixes( NextInterceptor, ListSuffixOperationContext )}.
085 */
086 Set<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception;
087
088
089 /**
090 * Calls the next interceptor's {@link DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext )}.
091 */
092 void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception;
093
094
095 /**
096 * Calls the next interceptor's {@link DefaultPartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext )}.
097 */
098 void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws Exception;
099
100
101 /**
102 * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, DeleteOperationContext )}.
103 */
104 void delete( DeleteOperationContext opContext ) throws Exception;
105
106
107 /**
108 * Calls the next interceptor's {@link Interceptor#add( NextInterceptor, AddOperationContext )}.
109 */
110 void add( AddOperationContext opContext ) throws Exception;
111
112
113 /**
114 * Calls the next interceptor's {@link Interceptor#modify( NextInterceptor, ModifyOperationContext )}.
115 */
116 void modify( ModifyOperationContext opContext ) throws Exception;
117
118 /**
119 * Calls the next interceptor's {@link Interceptor#list( NextInterceptor, ListOperationContext )}.
120 */
121 EntryFilteringCursor list( ListOperationContext opContext ) throws Exception;
122
123
124 /**
125 * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext opContext )}.
126 */
127 EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception;
128
129
130 /**
131 * Calls the next interceptor's {@link Interceptor#lookup( NextInterceptor, LookupOperationContext )}.
132 */
133 ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception;
134
135
136 /**
137 * Calls the next interceptor's {@link Interceptor#hasEntry( NextInterceptor, EntryOperationContext )}.
138 */
139 boolean hasEntry( EntryOperationContext opContext ) throws Exception;
140
141
142 /**
143 * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
144 */
145 void rename( RenameOperationContext opContext ) throws Exception;
146
147
148 /**
149 * Calls the next interceptor's {@link Interceptor#move( NextInterceptor, MoveOperationContext )}.
150 */
151 void move( MoveOperationContext opContext ) throws Exception;
152
153
154 /**
155 * Calls the next interceptor's {@link Interceptor#moveAndRename( NextInterceptor, MoveAndRenameOperationContext )}.
156 */
157 void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception;
158
159
160 /**
161 * Calls the next interceptor's {@link Interceptor#bind( NextInterceptor, BindOperationContext )}
162 */
163 void bind( BindOperationContext opContext ) throws Exception;
164
165 /**
166 * Calls the next interceptor's {@link Interceptor#unbind( NextInterceptor, UnbindOperationContext )}
167 */
168 void unbind( UnbindOperationContext opContext ) throws Exception;
169 }