View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
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  
32  
33  /***
34   * Represents the next {@link Interceptor} in the interceptor chain.
35   *
36   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
37   * @version $Rev: 226451 $, $Date: 2005-07-29 20:54:58 -0400 (Fri, 29 Jul 2005) $
38   * @see Interceptor
39   * @see InterceptorChain
40   */
41  public interface NextInterceptor
42  {
43      /***
44       * Calls the next interceptor's {@link Interceptor#getRootDSE(NextInterceptor)}.
45       */
46      Attributes getRootDSE() throws NamingException; 
47      /***
48       * Calls the next interceptor's {@link Interceptor#getMatchedName(NextInterceptor, Name, boolean)}.
49       */
50      Name getMatchedName( Name name, boolean normalized ) throws NamingException;
51      /***
52       * Calls the next interceptor's {@link Interceptor#getSuffix(NextInterceptor, Name, boolean)}.
53       */
54      Name getSuffix( Name name, boolean normalized ) throws NamingException;
55      /***
56       * Calls the next interceptor's {@link Interceptor#listSuffixes(NextInterceptor, boolean)}.
57       */
58      Iterator listSuffixes( boolean normalized ) throws NamingException;
59      /***
60       * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, Name)}.
61       */
62      void delete( Name name ) throws NamingException;
63      /***
64       * Calls the next interceptor's {@link Interceptor#add(NextInterceptor, String, Name, Attributes)}.
65       */
66      void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
67      /***
68       * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, int, Attributes)}.
69       */
70      void modify( Name name, int modOp, Attributes attributes ) throws NamingException;
71      /***
72       * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, ModificationItem[])}.
73       */
74      void modify( Name name, ModificationItem[] items ) throws NamingException;
75      /***
76       * Calls the next interceptor's {@link Interceptor#list(NextInterceptor, Name)}.
77       */
78      NamingEnumeration list( Name baseName ) throws NamingException;
79      /***
80       * Calls the next interceptor's {@link Interceptor#search(NextInterceptor, Name, Map, ExprNode, SearchControls)}.
81       */
82      NamingEnumeration search( Name baseName, Map environment, ExprNode filter,
83                                SearchControls searchControls ) throws NamingException;
84      /***
85       * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name)}.
86       */
87      Attributes lookup( Name name ) throws NamingException;
88      /***
89       * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name, String[])}.
90       */
91      Attributes lookup( Name name, String [] attrIds ) throws NamingException;
92      /***
93       * Calls the next interceptor's {@link Interceptor#hasEntry(NextInterceptor, Name)}.
94       */
95      boolean hasEntry( Name name ) throws NamingException;
96      /***
97       * Calls the next interceptor's {@link Interceptor#isSuffix(NextInterceptor, Name)}.
98       */
99      boolean isSuffix( Name name ) throws NamingException;
100     /***
101      * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor, Name, String, boolean)}.
102      */
103     void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException;
104     /***
105      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name)}.
106      */
107     void move( Name oldName, Name newParentName ) throws NamingException;
108     /***
109      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name, String, boolean)}.
110      */
111     void move( Name oldName, Name newParentName, String newRn,
112                boolean deleteOldRn ) throws NamingException;
113 }