Package edu.vt.middleware.ldap.props
Class AbstractPropertyConfig
- java.lang.Object
-
- edu.vt.middleware.ldap.props.AbstractPropertyConfig
-
- All Implemented Interfaces:
PropertyConfig
- Direct Known Subclasses:
LdapConfig
,LdapPoolConfig
public abstract class AbstractPropertyConfig extends java.lang.Object implements PropertyConfig
AbstractPropertyConfig
provides a base implementation ofPropertyConfig
.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
logger
Log for this class.
-
Constructor Summary
Constructors Constructor Description AbstractPropertyConfig()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkImmutable()
Verifies if this property config is immutable.protected void
checkStringInput(java.lang.String s, boolean allowNull)
Verifies that a string is not null or empty.abstract java.lang.String
getPropertiesDomain()
This returns the properties domain for this property config.abstract boolean
hasEnvironmentProperty(java.lang.String name)
This returns whether the supplied property exists.void
makeImmutable()
Make this property config immutable.abstract void
setEnvironmentProperties(java.lang.String name, java.lang.String value)
This adds environment properties to this object.void
setEnvironmentProperties(java.util.Hashtable<java.lang.String,java.lang.String> properties)
void
setEnvironmentProperties(java.util.Properties properties)
-
-
-
Method Detail
-
makeImmutable
public void makeImmutable()
Make this property config immutable.
-
checkImmutable
public void checkImmutable()
Verifies if this property config is immutable.- Throws:
java.lang.IllegalStateException
- if this property config is immutable
-
getPropertiesDomain
public abstract java.lang.String getPropertiesDomain()
This returns the properties domain for this property config.- Specified by:
getPropertiesDomain
in interfacePropertyConfig
- Returns:
String
properties domain
-
setEnvironmentProperties
public abstract void setEnvironmentProperties(java.lang.String name, java.lang.String value)
This adds environment properties to this object. If name or value is null, then this method does nothing.- Specified by:
setEnvironmentProperties
in interfacePropertyConfig
- Parameters:
name
-String
property namevalue
-String
property value
-
setEnvironmentProperties
public void setEnvironmentProperties(java.util.Properties properties)
- Specified by:
setEnvironmentProperties
in interfacePropertyConfig
- Parameters:
properties
-Properties
-
setEnvironmentProperties
public void setEnvironmentProperties(java.util.Hashtable<java.lang.String,java.lang.String> properties)
- Specified by:
setEnvironmentProperties
in interfacePropertyConfig
- Parameters:
properties
-Hashtable
of environment properties
-
hasEnvironmentProperty
public abstract boolean hasEnvironmentProperty(java.lang.String name)
This returns whether the supplied property exists.- Specified by:
hasEnvironmentProperty
in interfacePropertyConfig
- Parameters:
name
-String
to check- Returns:
boolean
whether the supplied property exists
-
checkStringInput
protected void checkStringInput(java.lang.String s, boolean allowNull)
Verifies that a string is not null or empty.- Parameters:
s
- to verifyallowNull
- whether null strings are valid- Throws:
java.lang.IllegalArgumentException
- if the string is null or empty
-
-