1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.interceptor;
18
19
20 import java.util.Iterator;
21 import java.util.Map;
22
23 import javax.naming.Name;
24 import javax.naming.NamingEnumeration;
25 import javax.naming.NamingException;
26 import javax.naming.directory.Attributes;
27 import javax.naming.directory.ModificationItem;
28 import javax.naming.directory.SearchControls;
29
30 import org.apache.ldap.common.filter.ExprNode;
31 import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
32 import org.apache.ldap.server.partition.ContextPartitionNexus;
33
34
35 /***
36 * Represents the next {@link Interceptor} in the interceptor chain.
37 *
38 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
39 * @version $Rev: 264732 $, $Date: 2005-08-30 04:04:51 -0400 (Tue, 30 Aug 2005) $
40 * @see Interceptor
41 * @see InterceptorChain
42 */
43 public interface NextInterceptor
44 {
45 /***
46 * Calls the next interceptor's {@link Interceptor#getRootDSE(NextInterceptor)}.
47 */
48 Attributes getRootDSE() throws NamingException;
49 /***
50 * Calls the next interceptor's {@link Interceptor#getMatchedName(NextInterceptor, Name, boolean)}.
51 */
52 Name getMatchedName( Name name, boolean normalized ) throws NamingException;
53 /***
54 * Calls the next interceptor's {@link Interceptor#getSuffix(NextInterceptor, Name, boolean)}.
55 */
56 Name getSuffix( Name name, boolean normalized ) throws NamingException;
57 /***
58 * Calls the next interceptor's {@link Interceptor#listSuffixes(NextInterceptor, boolean)}.
59 */
60 Iterator listSuffixes( boolean normalized ) throws NamingException;
61 /***
62 * Calls the next interceptor's {@link ContextPartitionNexus#addContextPartition(ContextPartitionConfiguration)}.
63 */
64 void addContextPartition( ContextPartitionConfiguration cfg ) throws NamingException;
65 /***
66 * Calls the next interceptor's {@link ContextPartitionNexus#removeContextPartition(Name)}.
67 */
68 void removeContextPartition( Name suffix ) throws NamingException;
69 /***
70 * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, Name)}.
71 */
72 void delete( Name name ) throws NamingException;
73 /***
74 * Calls the next interceptor's {@link Interceptor#add(NextInterceptor, String, Name, Attributes)}.
75 */
76 void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
77 /***
78 * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, int, Attributes)}.
79 */
80 void modify( Name name, int modOp, Attributes attributes ) throws NamingException;
81 /***
82 * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, ModificationItem[])}.
83 */
84 void modify( Name name, ModificationItem[] items ) throws NamingException;
85 /***
86 * Calls the next interceptor's {@link Interceptor#list(NextInterceptor, Name)}.
87 */
88 NamingEnumeration list( Name baseName ) throws NamingException;
89 /***
90 * Calls the next interceptor's {@link Interceptor#search(NextInterceptor, Name, Map, ExprNode, SearchControls)}.
91 */
92 NamingEnumeration search( Name baseName, Map environment, ExprNode filter,
93 SearchControls searchControls ) throws NamingException;
94 /***
95 * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name)}.
96 */
97 Attributes lookup( Name name ) throws NamingException;
98 /***
99 * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name, String[])}.
100 */
101 Attributes lookup( Name name, String [] attrIds ) throws NamingException;
102 /***
103 * Calls the next interceptor's {@link Interceptor#hasEntry(NextInterceptor, Name)}.
104 */
105 boolean hasEntry( Name name ) throws NamingException;
106 /***
107 * Calls the next interceptor's {@link Interceptor#isSuffix(NextInterceptor, Name)}.
108 */
109 boolean isSuffix( Name name ) throws NamingException;
110 /***
111 * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor, Name, String, boolean)}.
112 */
113 void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException;
114 /***
115 * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name)}.
116 */
117 void move( Name oldName, Name newParentName ) throws NamingException;
118 /***
119 * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name, String, boolean)}.
120 */
121 void move( Name oldName, Name newParentName, String newRn,
122 boolean deleteOldRn ) throws NamingException;
123 }