|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
Interface for generic configuration objects. Includes the ability
to write configuration to and from Properties
instances. Instances
are threadsafe for reads, but not for writes.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_ALLOWED_VALUES
Attribute of returned Value property descriptors listing
recognized values for the property. |
static java.lang.String |
ATTRIBUTE_CATEGORY
Attribute of the returned Value property descriptors naming
the property' hierarchical category. |
static java.lang.String |
ATTRIBUTE_INTERFACE
Attribute of the returned Value property descriptors naming
the interface that plugin values for this property must implement. |
static java.lang.String |
ATTRIBUTE_ORDER
Attribute of the returned Value property descriptors naming
the property's ordering in its category. |
static java.lang.String |
ATTRIBUTE_TYPE
Attribute of the returned Value property descriptors naming
the property's type or category. |
static java.lang.String |
ATTRIBUTE_XML
Attribute of the returned Value property descriptors naming
the property's name in XML format (i.e. |
Fields inherited from interface java.beans.BeanInfo |
---|
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener for any property changes. |
void |
addPropertyPrefix(java.lang.String prefix)
Add prefix to the list of prefixes to use
to identify valid configuration properties. |
Value |
addValue(Value val)
Add the given value to the set of configuration properties. |
java.lang.Object |
clone()
Return a copy of this configuration. |
void |
close()
Free the resources used by this object. |
void |
fromProperties(java.util.Map map)
Set this Configuration via the given map. |
Log |
getConfigurationLog()
Return the log to use for configuration messages. |
java.lang.String |
getLog()
Log plugin setting. |
Log |
getLog(java.lang.String category)
Return the log for the given category. |
LogFactory |
getLogFactory()
The log factory. |
java.lang.String |
getProductName()
Return the product name. |
Value |
getValue(java.lang.String property)
Return the Value for the given property, or null if none. |
Value[] |
getValues()
Return the set of all Value s. |
void |
instantiateAll()
Call the instantiating get methods for all values. |
boolean |
isReadOnly()
Return true if this configuration is immutable. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener for any property changes. |
boolean |
removeValue(Value val)
Remove the given value from the set of configuration properties. |
void |
setLog(java.lang.String log)
Log plugin setting. |
void |
setLogFactory(LogFactory factory)
The log factory. |
void |
setProductName(java.lang.String name)
Set the product name. |
void |
setReadOnly(boolean readOnly)
Lock down the configuration's state. |
java.util.Map |
toProperties(boolean storeDefaults)
A properties representation of this Configuration. |
Methods inherited from interface java.beans.BeanInfo |
---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
Field Detail |
---|
static final java.lang.String ATTRIBUTE_ALLOWED_VALUES
Value
property descriptors listing
recognized values for the property.
static final java.lang.String ATTRIBUTE_TYPE
Value
property descriptors naming
the property's type or category.
static final java.lang.String ATTRIBUTE_CATEGORY
Value
property descriptors naming
the property' hierarchical category.
static final java.lang.String ATTRIBUTE_ORDER
Value
property descriptors naming
the property's ordering in its category.
static final java.lang.String ATTRIBUTE_INTERFACE
Value
property descriptors naming
the interface that plugin values for this property must implement.
static final java.lang.String ATTRIBUTE_XML
Value
property descriptors naming
the property's name in XML format (i.e. two-words instead of TwoWords).
Method Detail |
---|
java.lang.String getProductName()
openjpa
.
void setProductName(java.lang.String name)
LogFactory getLogFactory()
void setLogFactory(LogFactory factory)
java.lang.String getLog()
void setLog(java.lang.String log)
Log getLog(java.lang.String category)
getLogFactory()
Log getConfigurationLog()
Value getValue(java.lang.String property)
Value
for the given property, or null if none.
Value[] getValues()
Value
s.
Value addValue(Value val)
boolean removeValue(Value val)
java.util.Map toProperties(boolean storeDefaults)
storeDefaults
- if true, then properties will be written
out even if they match the default value for a propertyvoid fromProperties(java.util.Map map)
equals
and
hashCode
methods. If the object's property has no
string form(such as an ObjectValue
), the object is not
part of the equality and hashing calculations.
void addPropertyPrefix(java.lang.String prefix)
prefix
to the list of prefixes to use
to identify valid configuration properties. "openjpa" and any
product name set with setProductName(java.lang.String)
will automatically
be added.
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to receive notification of property changesvoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to removevoid setReadOnly(boolean readOnly)
boolean isReadOnly()
void instantiateAll()
void close()
close
in interface Closeable
java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |