edu.vt.middleware.ldap.ssl
Class CredentialConfigParser

java.lang.Object
  extended by edu.vt.middleware.ldap.ssl.CredentialConfigParser

public class CredentialConfigParser
extends Object

Parses the configuration data associated with credential configs and ssl socket factories. The format of the property string should be like:

   MySSLSocketFactory
     {KeyStoreCredentialConfig
       {{trustStore=/tmp/my.truststore}{trustStoreType=JKS}}}
 

or

   {KeyStoreCredentialConfig
     {{trustStore=/tmp/my.truststore}{trustStoreType=JKS}}}
 

or

   {{trustCertificates=/tmp/my.crt}}
 

Version:
$Revision: 930 $ $Date: 2009-10-26 16:44:26 -0400 (Mon, 26 Oct 2009) $
Author:
Middleware Services

Constructor Summary
CredentialConfigParser(String config)
          Creates a new CredentialConfigParser with the supplied configuration string.
 
Method Summary
 String getCredentialConfigClassName()
          Returns the credential config class name from the configuration.
 Map<String,String> getProperties()
          Returns the properties from the configuration.
 String getSslSocketFactoryClassName()
          Returns the SSL socket factory class name from the configuration.
 Object initializeType()
          Initialize an instance of credential config with the properties contained in this config.
static boolean isCredentialConfig(String config)
          Returns whether the supplied configuration data contains a credential config.
protected  void setProperties(Class<?> c, Object o)
          Sets the properties on the supplied object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialConfigParser

public CredentialConfigParser(String config)
Creates a new CredentialConfigParser with the supplied configuration string.

Parameters:
config - String
Method Detail

getSslSocketFactoryClassName

public String getSslSocketFactoryClassName()
Returns the SSL socket factory class name from the configuration.

Returns:
String class name

getCredentialConfigClassName

public String getCredentialConfigClassName()
Returns the credential config class name from the configuration.

Returns:
String class name

getProperties

public Map<String,String> getProperties()
Returns the properties from the configuration.

Returns:
Map of property name to value

isCredentialConfig

public static boolean isCredentialConfig(String config)
Returns whether the supplied configuration data contains a credential config.

Parameters:
config - String
Returns:
boolean

initializeType

public Object initializeType()
Initialize an instance of credential config with the properties contained in this config.

Returns:
Object of the type CredentialConfig

setProperties

protected void setProperties(Class<?> c,
                             Object o)
Sets the properties on the supplied object.

Parameters:
c - Class type of the supplied object
o - Object to invoke properties on


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.