KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ldap > server > authn > GenericAuthenticatorConfig


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.authn;
18
19 import java.util.Enumeration JavaDoc;
20 import java.util.Properties JavaDoc;
21
22 /**
23  * Default implementation of AuthenticatorConfig.
24  *
25  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
26  */

27 public class GenericAuthenticatorConfig implements AuthenticatorConfig {
28
29     private String JavaDoc authenticatorName;
30     private String JavaDoc authenticatorClass;
31     private AuthenticatorContext authenticatorContext;
32     private Properties JavaDoc properties = new Properties JavaDoc();
33
34     public String JavaDoc getAuthenticatorName()
35     {
36         return authenticatorName;
37     }
38
39     public void setAuthenticatorName( String JavaDoc authenticatorName )
40     {
41         this.authenticatorName = authenticatorName;
42     }
43
44     public String JavaDoc getAuthenticatorClass()
45     {
46         return authenticatorClass;
47     }
48
49     public void setAuthenticatorClass( String JavaDoc authenticatorClass )
50     {
51         this.authenticatorClass = authenticatorClass;
52     }
53
54     public Properties JavaDoc getProperties()
55     {
56         return properties;
57     }
58
59     public void setProperties( Properties JavaDoc properties )
60     {
61         this.properties = properties;
62     }
63
64     public String JavaDoc getInitParameter( String JavaDoc name )
65     {
66         return properties.getProperty( name );
67     }
68
69     public Enumeration JavaDoc getInitParameterNames()
70     {
71         return properties.keys();
72     }
73
74     public AuthenticatorContext getAuthenticatorContext()
75     {
76         return authenticatorContext;
77     }
78
79     public void setAuthenticatorContext( AuthenticatorContext authenticatorContext )
80     {
81         this.authenticatorContext = authenticatorContext;
82     }
83 }
84
Popular Tags