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.interceptor.context;
21  
22  
23  import java.util.Set;
24  
25  import org.apache.directory.server.core.CoreSession;
26  import org.apache.directory.shared.ldap.name.LdapDN;
27  import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
28  import org.apache.directory.shared.ldap.message.AliasDerefMode;
29  
30  
31  /**
32   * A ListContext context used for Interceptors. It contains all the informations
33   * needed for the List operation, and used by all the interceptors
34   *
35   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
36   * @version $Rev$, $Date$
37   */
38  public class ListOperationContext extends SearchingOperationContext
39  {
40      /**
41       * Creates a new instance of ListOperationContext.
42       */
43      public ListOperationContext( CoreSession session )
44      {
45          super( session );
46      }
47  
48  
49      /**
50       * Creates a new instance of ListOperationContext.
51       *
52       * @param dn The DN to get the suffix from
53       */
54      public ListOperationContext( CoreSession session, LdapDN dn )
55      {
56          super( session, dn );
57      }
58  
59  
60      /**
61       * Creates a new instance of ListOperationContext.
62       *
63       * @param dn The DN to get the suffix from
64       * @param aliasDerefMode the alias dereferencing mode to use
65       */
66      public ListOperationContext( CoreSession session, LdapDN dn, AliasDerefMode aliasDerefMode )
67      {
68          super( session, dn, aliasDerefMode );
69      }
70  
71      
72      /**
73       * Creates a new instance of ListOperationContext with attributes to return.
74       *
75       * @param session the session associated with this {@link OperationContext}
76       * @param dn the base DN 
77       * @param aliasDerefMode the alias dereferencing mode to use
78       * @param returningAttributes the attributes to return
79       */
80      public ListOperationContext( CoreSession session, LdapDN dn, AliasDerefMode aliasDerefMode,
81          Set<AttributeTypeOptions> returningAttributes )
82      {
83          super( session, dn, aliasDerefMode, returningAttributes );
84      }
85  
86  
87      /**
88       * @return the operation name
89       */
90      public String getName()
91      {
92          return "List";
93      }
94  
95      
96      /**
97       * @see Object#toString()
98       */
99      public String toString()
100     {
101         return "List with DN '" + getDn().getUpName() + "'";
102     }
103 }