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;
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.AddOperationContext;
28  import org.apache.directory.server.core.interceptor.context.BindOperationContext;
29  import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
30  import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
31  import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
32  import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
33  import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
34  import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
35  import org.apache.directory.server.core.interceptor.context.ListOperationContext;
36  import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
37  import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
38  import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
39  import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
40  import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
41  import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
42  import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
43  import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
44  import org.apache.directory.shared.ldap.name.LdapDN;
45  
46  
47  /**
48   * An interface used by the DirectoryService to isolate operations that can be 
49   * performed on it.
50   *
51   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
52   * @version $Rev$, $Date$
53   */
54  public interface OperationManager
55  {
56      /**
57       * TODO document after determining if this method should be here.
58       */
59      ClonedServerEntry getRootDSE( GetRootDSEOperationContext  opContext ) throws Exception;
60  
61  
62      /**
63       * TODO document after determining if this method should be here.
64       */
65      LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception;
66  
67  
68      /**
69       * TODO document after determining if this method should be here.
70       */
71      LdapDN getSuffix ( GetSuffixOperationContext opContext ) throws Exception;
72  
73  
74      /**
75       * TODO document after determining if this method should be here.
76       */
77      Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception;
78  
79  
80      /**
81       * TODO document after determining if this method should be here.
82       */
83      boolean compare( CompareOperationContext opContext) throws Exception;
84  
85  
86      /**
87       * TODO document after determining if this method should be here.
88       */
89      void delete( DeleteOperationContext opContext ) throws Exception;
90  
91  
92      /**
93       * TODO document after determining if this method should be here.
94       */
95      void add( AddOperationContext opContext ) throws Exception;
96  
97  
98      /**
99       * TODO document after determining if this method should be here.
100      */
101     void modify( ModifyOperationContext opContext ) throws Exception;
102 
103 
104     /**
105      * TODO document after determining if this method should be here.
106      */
107     EntryFilteringCursor list( ListOperationContext opContext ) throws Exception;
108 
109 
110     /**
111      * TODO document after determining if this method should be here.
112      */
113     EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception;
114 
115 
116     /**
117      * TODO document after determining if this method should be here.
118      */
119     ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception;
120 
121 
122     /**
123      * TODO document after determining if this method should be here.
124      */
125     boolean hasEntry( EntryOperationContext opContext ) throws Exception;
126 
127 
128     /**
129      * TODO document after determining if this method should be here.
130      */
131     void rename( RenameOperationContext opContext ) throws Exception;
132 
133 
134     /**
135      * TODO document after determining if this method should be here.
136      */
137     void move( MoveOperationContext opContext ) throws Exception;
138 
139 
140     /**
141      * TODO document after determining if this method should be here.
142      */
143     void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception;
144 
145     
146     /**
147      * TODO document after determining if this method should be here.
148      */
149     void bind( BindOperationContext opContext ) throws Exception;
150 
151     
152     /**
153      * TODO document after determining if this method should be here.
154      */
155     void unbind( UnbindOperationContext opContext ) throws Exception;
156 }