edu.vt.middleware.ldap.props
Class AbstractPropertyConfig

java.lang.Object
  extended by edu.vt.middleware.ldap.props.AbstractPropertyConfig
All Implemented Interfaces:
PropertyConfig
Direct Known Subclasses:
LdapConfig, LdapPoolConfig

public abstract class AbstractPropertyConfig
extends Object
implements PropertyConfig

AbstractPropertyConfig provides a base implementation of PropertyConfig.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
protected  org.apache.commons.logging.Log logger
          Log for this class.
 
Constructor Summary
AbstractPropertyConfig()
           
 
Method Summary
 void checkImmutable()
          Verifies if this property config is immutable.
protected  void checkStringInput(String s, boolean allowNull)
          Verifies that a string is not null or empty.
abstract  String getPropertiesDomain()
          This returns the properties domain for this property config.
abstract  boolean hasEnvironmentProperty(String name)
          This returns whether the supplied property exists.
 void makeImmutable()
          Make this property config immutable.
 void setEnvironmentProperties(Hashtable<String,String> properties)
          See setEnvironmentProperties(String,String).
 void setEnvironmentProperties(Properties properties)
          See PropertyConfig.setEnvironmentProperties(String,String).
abstract  void setEnvironmentProperties(String name, String value)
          This adds environment properties to this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Log for this class.

Constructor Detail

AbstractPropertyConfig

public AbstractPropertyConfig()
Method Detail

makeImmutable

public void makeImmutable()
Make this property config immutable.


checkImmutable

public void checkImmutable()
Verifies if this property config is immutable.

Throws:
IllegalStateException - if this property config is immutable

getPropertiesDomain

public abstract String getPropertiesDomain()
This returns the properties domain for this property config.

Specified by:
getPropertiesDomain in interface PropertyConfig
Returns:
String properties domain

setEnvironmentProperties

public abstract void setEnvironmentProperties(String name,
                                              String value)
This adds environment properties to this object. If name or value is null, then this method does nothing.

Specified by:
setEnvironmentProperties in interface PropertyConfig
Parameters:
name - String property name
value - String property value

setEnvironmentProperties

public void setEnvironmentProperties(Properties properties)
See PropertyConfig.setEnvironmentProperties(String,String).

Specified by:
setEnvironmentProperties in interface PropertyConfig
Parameters:
properties - Properties

setEnvironmentProperties

public void setEnvironmentProperties(Hashtable<String,String> properties)
See setEnvironmentProperties(String,String).

Specified by:
setEnvironmentProperties in interface PropertyConfig
Parameters:
properties - Hashtable of environment properties

hasEnvironmentProperty

public abstract boolean hasEnvironmentProperty(String name)
This returns whether the supplied property exists.

Specified by:
hasEnvironmentProperty in interface PropertyConfig
Parameters:
name - String to check
Returns:
boolean whether the supplied property exists

checkStringInput

protected void checkStringInput(String s,
                                boolean allowNull)
Verifies that a string is not null or empty.

Parameters:
s - to verify
allowNull - whether null strings are valid
Throws:
IllegalArgumentException - if the string is null or empty


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