View Javadoc

1   /*
2    *   @(#) $Id: ACITupleFilter.java 326050 2005-10-18 08:19:14Z akarasulu $
3    *   
4    *   Copyright 2004 The Apache Software Foundation
5    *
6    *   Licensed under the Apache License, Version 2.0 (the "License");
7    *   you may not use this file except in compliance with the License.
8    *   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, software
13   *   distributed under the License is distributed on an "AS IS" BASIS,
14   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   *   See the License for the specific language governing permissions and
16   *   limitations under the License.
17   *
18   */
19  package org.apache.ldap.server.authz.support;
20  
21  import java.util.Collection;
22  
23  import javax.naming.Name;
24  import javax.naming.NamingException;
25  import javax.naming.directory.Attributes;
26  
27  import org.apache.ldap.common.aci.AuthenticationLevel;
28  import org.apache.ldap.common.aci.MicroOperation;
29  import org.apache.ldap.server.partition.DirectoryPartitionNexusProxy;
30  
31  
32  /***
33   * An interface that filters the specified collection of tuples using the
34   * specified extra information.
35   *
36   * @author The Apache Directory Project
37   * @version $Rev: 326050 $, $Date: 2005-10-18 04:19:14 -0400 (Tue, 18 Oct 2005) $
38   *
39   */
40  public interface ACITupleFilter
41  {
42      /***
43       * Returns the collection of the filtered tuples using the specified
44       * extra information.
45       * 
46       * @param tuples the collection of tuples to filter
47       * @param scope the scope of the operation to be performed
48       * @param proxy the proxy interceptor for this filter to access the DIT
49       * @param userGroupNames the collection of group ({@link Name})s which the current user belongs to
50       * @param userName the {@link Name} of the current user
51       * @param userEntry the {@link Attributes} of the current user entry in the DIT
52       * @param authenticationLevel the level of authentication of the current user
53       * @param entryName the {@link Name} of the entry the current user accesses
54       * @param attrId the attribute ID the current user accesses
55       * @param attrValue the value of the attribute the current user accesses
56       * @param entry the {@link Attributes} of the entry the current user accesses
57       * @param microOperations the set of {@link MicroOperation}s the current user will perform
58       * 
59       * @return the collection of filtered tuples
60       * @throws NamingException if failed to filter the specifiec tuples
61       */
62      Collection filter(
63              Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
64              Collection userGroupNames, Name userName, Attributes userEntry,
65              AuthenticationLevel authenticationLevel,
66              Name entryName, String attrId, Object attrValue, Attributes entry,
67              Collection microOperations ) throws NamingException;
68  }