View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
15   *
16   */
17  package org.apache.ldap.server.jndi;
18  
19  import java.util.Hashtable;
20  
21  import javax.naming.Context;
22  import javax.naming.NamingException;
23  
24  import org.apache.ldap.server.configuration.StartupConfiguration;
25  import org.apache.ldap.server.interceptor.InterceptorChain;
26  import org.apache.ldap.server.partition.ContextPartitionNexus;
27  import org.apache.ldap.server.schema.GlobalRegistries;
28  
29  
30  /***
31   * Default implementation of {@link ContextFactoryConfiguration}.
32   * 
33   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
34   * @version $Rev: 264732 $
35   */
36  class DefaultContextFactoryConfiguration implements ContextFactoryConfiguration
37  {
38      private DefaultContextFactoryService parent;
39      
40      DefaultContextFactoryConfiguration( DefaultContextFactoryService parent )
41      {
42          this.parent = parent;
43      }
44      
45      public String getInstanceId()
46      {
47          return parent.getInstanceId();
48      }
49      
50      public ContextFactoryService getService()
51      {
52          return parent;
53      }
54  
55      public ContextFactoryServiceListener getServiceListener()
56      {
57          return parent.getServiceListener();
58      }
59  
60      public Hashtable getEnvironment()
61      {
62          return parent.getEnvironment();
63      }
64      
65      public StartupConfiguration getStartupConfiguration()
66      {
67          return parent.getStartupConfiguration();
68      }
69      
70      public GlobalRegistries getGlobalRegistries()
71      {
72          return parent.getGlobalRegistries();
73      }
74  
75      public ContextPartitionNexus getPartitionNexus()
76      {
77          return parent.getPartitionNexus();
78      }
79      
80      public InterceptorChain getInterceptorChain()
81      {
82          return parent.getInterceptorChain();
83      }
84      
85      public boolean isFirstStart()
86      {
87          return parent.isFirstStart();
88      }
89  
90      public Context getJndiContext( String baseName ) throws NamingException
91      {
92          return parent.getJndiContext( baseName );
93      }
94  
95      public Context getJndiContext( String principal, byte[] credential, String authentication, String baseName ) throws NamingException
96      {
97          return parent.getJndiContext( principal, credential, authentication, baseName );
98      }
99  }