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;
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.AddOperationContext;
028    import org.apache.directory.server.core.interceptor.context.BindOperationContext;
029    import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
030    import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
031    import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
032    import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
033    import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
034    import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
035    import org.apache.directory.server.core.interceptor.context.ListOperationContext;
036    import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
037    import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
038    import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
039    import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
040    import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
041    import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
042    import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
043    import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
044    import org.apache.directory.shared.ldap.name.DN;
045    
046    
047    /**
048     * An interface used by the DirectoryService to isolate operations that can be 
049     * performed on it.
050     *
051     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
052     * @version $Rev$, $Date$
053     */
054    public interface OperationManager
055    {
056        /**
057         * TODO document after determining if this method should be here.
058         */
059        ClonedServerEntry getRootDSE( GetRootDSEOperationContext  opContext ) throws Exception;
060    
061    
062        /**
063         * TODO document after determining if this method should be here.
064         */
065        DN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception;
066    
067    
068        /**
069         * TODO document after determining if this method should be here.
070         */
071        DN getSuffix ( GetSuffixOperationContext opContext ) throws Exception;
072    
073    
074        /**
075         * TODO document after determining if this method should be here.
076         */
077        Set<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception;
078    
079    
080        /**
081         * TODO document after determining if this method should be here.
082         */
083        boolean compare( CompareOperationContext opContext) throws Exception;
084    
085    
086        /**
087         * TODO document after determining if this method should be here.
088         */
089        void delete( DeleteOperationContext opContext ) throws Exception;
090    
091    
092        /**
093         * TODO document after determining if this method should be here.
094         */
095        void add( AddOperationContext opContext ) throws Exception;
096    
097    
098        /**
099         * 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    }