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.filtering;
021
022
023 import java.util.List;
024
025 import org.apache.directory.server.core.entry.ClonedServerEntry;
026 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
027 import org.apache.directory.shared.ldap.cursor.Cursor;
028
029
030 /**
031 *
032 * TODO Add Javadoc !
033 *
034 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
035 * @version $Rev$, $Date$
036 */
037 public interface EntryFilteringCursor extends Cursor<ClonedServerEntry>
038 {
039
040 /**
041 * Gets whether or not this BaseEntryFilteringCursor has been abandoned.
042 *
043 * @return true if abandoned, false if not
044 */
045 public abstract boolean isAbandoned();
046
047
048 /**
049 * Sets whether this BaseEntryFilteringCursor has been abandoned.
050 *
051 * @param abandoned true if abandoned, false if not
052 */
053 public abstract void setAbandoned( boolean abandoned );
054
055
056 /**
057 * Adds an entry filter to this BaseEntryFilteringCursor at the very end of
058 * the filter list. EntryFilters are applied in the order of addition.
059 *
060 * @param filter a filter to apply to the entries
061 * @return the result of {@link List#add(Object)}
062 */
063 public abstract boolean addEntryFilter( EntryFilter filter );
064
065
066 /**
067 * Removes an entry filter to this BaseEntryFilteringCursor at the very end of
068 * the filter list.
069 *
070 * @param filter a filter to remove from the filter list
071 * @return the result of {@link List#remove(Object)}
072 */
073 public abstract boolean removeEntryFilter( EntryFilter filter );
074
075
076 /**
077 * Gets an unmodifiable list of EntryFilters applied.
078 *
079 * @return an unmodifiable list of EntryFilters applied
080 */
081 public abstract List<EntryFilter> getEntryFilters();
082
083
084 /**
085 * @return the operationContext
086 */
087 public abstract SearchingOperationContext getOperationContext();
088 }