T - type of object to invoke properties onpublic abstract class AbstractPropertySource<T> extends java.lang.Object implements PropertySource<T>
PropertySource.PropertyDomain| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
extraProps
Properties that are not in the ldaptive domain.
|
protected org.slf4j.Logger |
logger
Logger for this class.
|
protected T |
object
Object to initialize with properties.
|
protected java.util.Properties |
properties
Properties to set.
|
static java.lang.String |
PROPERTIES_FILE
Default file to read properties from, value is "classpath:/org/ldaptive/ldap.properties".
|
protected PropertySource.PropertyDomain |
propertiesDomain
Domain that properties are in.
|
| Constructor and Description |
|---|
AbstractPropertySource(T t,
PropertySource.PropertyDomain pd,
java.util.Properties p)
Creates a new abstract property source.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
initializeObject(PropertyInvoker invoker)
Iterates over the properties and uses the invoker to set those properties on the object.
|
protected static java.util.Properties |
loadProperties(java.io.Reader... readers)
Creates properties from the supplied reader.
|
protected static java.util.Properties |
loadProperties(java.lang.String... paths)
Creates properties from the supplied file paths.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializepublic static final java.lang.String PROPERTIES_FILE
protected final org.slf4j.Logger logger
protected final T object
protected final PropertySource.PropertyDomain propertiesDomain
protected final java.util.Properties properties
protected final java.util.Map<java.lang.String,java.lang.Object> extraProps
public AbstractPropertySource(T t, PropertySource.PropertyDomain pd, java.util.Properties p)
t - to set properties onpd - domain that properties reside inp - properties to setprotected static java.util.Properties loadProperties(java.lang.String... paths)
loadProperties(Reader...).paths - to read properties fromprotected static java.util.Properties loadProperties(java.io.Reader... readers)
Properties.load(Reader). Readers supplied to this method
will be closed.readers - to read properties fromprotected void initializeObject(PropertyInvoker invoker)
invoker - to set properties on the object