public interface Configuration extends BeanInfo, Serializable, Closeable, Cloneable
Properties
instances. Instances
are threadsafe for reads, but not for writes.Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_ALLOWED_VALUES
Attribute of returned
Value property descriptors listing
recognized values for the property. |
static String |
ATTRIBUTE_CATEGORY
Attribute of the returned
Value property descriptors naming
the property' hierarchical category. |
static String |
ATTRIBUTE_INTERFACE
Attribute of the returned
Value property descriptors naming
the interface that plugin values for this property must implement. |
static String |
ATTRIBUTE_ORDER
Attribute of the returned
Value property descriptors naming
the property's ordering in its category. |
static String |
ATTRIBUTE_TYPE
Attribute of the returned
Value property descriptors naming
the property's type or category. |
static String |
ATTRIBUTE_XML
Attribute of the returned
Value property descriptors naming
the property's name in XML format (i.e. two-words instead of TwoWords). |
static int |
INIT_STATE_FREEZING |
static int |
INIT_STATE_FROZEN |
static int |
INIT_STATE_LIQUID |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for any property changes.
|
<T extends Value> |
addValue(T val)
Add the given value to the set of configuration properties.
|
Object |
clone()
Return a copy of this configuration.
|
void |
close()
Free the resources used by this object.
|
void |
fromProperties(Map map)
Set this Configuration via the given map.
|
Log |
getConfigurationLog()
Return the log to use for configuration messages.
|
String |
getId()
An environment-specific identifier for this configuration.
|
String |
getLog()
Log plugin setting.
|
Log |
getLog(String category)
Return the log for the given category.
|
LogFactory |
getLogFactory()
The log factory.
|
String |
getProductName()
Return the product name.
|
Set<String> |
getPropertyKeys()
Get the set of all known property keys, including any equivalent keys,
appropriately prefixed.
|
List<String> |
getPropertyKeys(String propertyName)
Get the set of all known property keys, including any equivalent keys,
appropriately prefixed.
|
ClassLoader |
getUserClassLoader()
Gets a class loader that can be additionally used to load custom plugin values.
|
Value |
getValue(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(PropertyChangeListener listener)
Removes a listener for any property changes.
|
boolean |
removeValue(Value val)
Remove the given value from the set of configuration properties.
|
void |
setId(String id)
An environment-specific identifier for this configuration.
|
void |
setLog(String log)
Log plugin setting.
|
void |
setLogFactory(LogFactory factory)
The log factory.
|
void |
setProductName(String name)
Set the product name.
|
void |
setReadOnly(int readOnly)
Lock down the configuration's state.
|
void |
setUserClassLoader(ClassLoader loader)
Sets an additional classloader to load custom plugin values.
|
Map<String,Object> |
toProperties(boolean storeDefaults)
A properties representation of this Configuration.
|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors
static final String ATTRIBUTE_ALLOWED_VALUES
Value
property descriptors listing
recognized values for the property.static final String ATTRIBUTE_TYPE
Value
property descriptors naming
the property's type or category.static final String ATTRIBUTE_CATEGORY
Value
property descriptors naming
the property' hierarchical category.static final String ATTRIBUTE_ORDER
Value
property descriptors naming
the property's ordering in its category.static final String ATTRIBUTE_INTERFACE
Value
property descriptors naming
the interface that plugin values for this property must implement.static final String ATTRIBUTE_XML
Value
property descriptors naming
the property's name in XML format (i.e. two-words instead of TwoWords).static final int INIT_STATE_LIQUID
static final int INIT_STATE_FREEZING
static final int INIT_STATE_FROZEN
String getProductName()
openjpa
.void setProductName(String name)
LogFactory getLogFactory()
void setLogFactory(LogFactory factory)
String getLog()
void setLog(String log)
Log getLog(String category)
getLogFactory()
Log getConfigurationLog()
String getId()
void setId(String id)
<T extends Value> T addValue(T val)
boolean removeValue(Value val)
Map<String,Object> toProperties(boolean storeDefaults)
storeDefaults
- if true, then properties will be written
out even if they match the default value for a propertyList<String> getPropertyKeys(String propertyName)
propertyName
- the name of the property for which the keys are
to be retrieved.Set<String> getPropertyKeys()
void fromProperties(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 addPropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to receive notification of property changesvoid removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to removevoid setReadOnly(int readOnly)
boolean isReadOnly()
void instantiateAll()
void close()
Object clone()
ClassLoader getUserClassLoader()
Configurations.newInstance(String, ClassLoader)
void setUserClassLoader(ClassLoader loader)
loader
- a class loader to load custom plugin valuesPersistenceProviderImpl.createEntityManagerFactory(String, Map)
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.