Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.lib » conf » [javadoc | source]
org.apache.openjpa.lib.conf
public class: ConfigurationImpl [javadoc | source]
java.lang.Object
   org.apache.openjpa.lib.conf.ConfigurationImpl

All Implemented Interfaces:
    Configuration, Externalizable, ValueListener

Direct Known Subclasses:
    JDBCConfigurationImpl, OpenJPAConfigurationImpl, XMLConfiguration, DistributedJDBCConfigurationImpl

Default implementation of the Configuration interface. Subclasses can choose to obtain configuration information from JNDI, Properties, a Bean-builder, etc. This class provides base configuration functionality, including serialization, the equals and hashCode contracts, and default property loading. Property descriptors for Value instances are constructed from the Localizer for the package of the configuration class. The following localized strings will be used for describing a value, where name is the last token of the value's property string:
Field Summary
public  ObjectValue logFactoryPlugin     
public  StringValue id     
Constructor:
 public ConfigurationImpl() 
 public ConfigurationImpl(boolean loadGlobals) 
Method from org.apache.openjpa.lib.conf.ConfigurationImpl Summary:
addBoolean,   addDouble,   addFile,   addInt,   addObject,   addPlugin,   addPluginList,   addPropertyChangeListener,   addString,   addStringList,   addValue,   clone,   close,   equals,   fromProperties,   getAdditionalBeanInfo,   getBeanDescriptor,   getConfigurationLog,   getDefaultEventIndex,   getDefaultPropertyIndex,   getEventSetDescriptors,   getIcon,   getId,   getLog,   getLog,   getLogFactory,   getMethodDescriptors,   getProductName,   getPropertiesResource,   getPropertyDescriptors,   getValue,   getValues,   hashCode,   instantiateAll,   isInvalidProperty,   isReadOnly,   loadGlobals,   preClose,   readExternal,   removePropertyChangeListener,   removeValue,   setId,   setLog,   setLogFactory,   setProductName,   setProperties,   setPropertiesFile,   setReadOnly,   toProperties,   toXMLName,   valueChanged,   writeExternal
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.lib.conf.ConfigurationImpl Detail:
 public BooleanValue addBoolean(String property) 
    Add the given value to the set of configuration properties.
 public DoubleValue addDouble(String property) 
    Add the given value to the set of configuration properties.
 public FileValue addFile(String property) 
    Add the given value to the set of configuration properties.
 public IntValue addInt(String property) 
    Add the given value to the set of configuration properties.
 public ObjectValue addObject(String property) 
    Add the given value to the set of configuration properties.
 public PluginValue addPlugin(String property,
    boolean singleton) 
    Add the given value to the set of configuration properties.
 public PluginListValue addPluginList(String property) 
    Add the given value to the set of configuration properties.
 public  void addPropertyChangeListener(PropertyChangeListener listener) 
 public StringValue addString(String property) 
    Add the given value to the set of configuration properties.
 public StringListValue addStringList(String property) 
    Add the given value to the set of configuration properties.
 public Value addValue(Value val) 
 public Object clone() 
 public final  void close() 
    Closes all closeable values and plugins.
 public boolean equals(Object other) 
    Performs an equality check based on equality of values. Equality of Values varies if the Value is dynamic .
 public  void fromProperties(Map map) 
 public BeanInfo[] getAdditionalBeanInfo() 
 public BeanDescriptor getBeanDescriptor() 
 public Log getConfigurationLog() 
    Returns the logging channel openjpa.Runtime by default.
 public int getDefaultEventIndex() 
 public int getDefaultPropertyIndex() 
 public EventSetDescriptor[] getEventSetDescriptors() 
 public Image getIcon(int kind) 
 public String getId() 
 public String getLog() 
 public Log getLog(String category) 
 public LogFactory getLogFactory() 
 public synchronized MethodDescriptor[] getMethodDescriptors() 
 public String getProductName() 
 public String getPropertiesResource() 
 public synchronized PropertyDescriptor[] getPropertyDescriptors() 
 public Value getValue(String property) 
 public Value[] getValues() 
 public int hashCode() 
    Computes hash code based on the hashCodes of the values. HashCode of a Value varies if the Value is dynamic .
 public  void instantiateAll() 
 protected boolean isInvalidProperty(String propName) 
    Returns true if the specified property name should raise a warning if it is not found in the list of known properties.
 public boolean isReadOnly() 
 public boolean loadGlobals() 
    Automatically load global values from the system's ProductDerivation s, and from System properties.
 protected  void preClose() 
 public  void readExternal(ObjectInput in) throws ClassNotFoundException, IOException 
 public  void removePropertyChangeListener(PropertyChangeListener listener) 
 public boolean removeValue(Value val) 
 public  void setId(String id) 
 public  void setLog(String log) 
 public  void setLogFactory(LogFactory logFactory) 
 public  void setProductName(String name) 
 public  void setProperties(String resourceName) throws IOException 
    This method loads the named resource as a properties file. It is useful for auto-configuration tools so users can specify a properties value with the name of a resource.
 public  void setPropertiesFile(File file) throws IOException 
    This method loads the named file as a properties file. It is useful for auto-configuration tools so users can specify a propertiesFile value with the name of a file.
 public  void setReadOnly(int newState) 
 public Map toProperties(boolean storeDefaults) 
 public static String toXMLName(String propName) 
    Convert propName to a lowercase-with-hyphens-style string. This algorithm is only designed for mixes of uppercase and lowercase letters and lone digits. A more sophisticated conversion should probably be handled by a proper parser generator or regular expressions.
 public  void valueChanged(Value val) 
 public  void writeExternal(ObjectOutput out) throws IOException