| java.lang.Object org.xorm.util.AppConfig
AppConfig | public class AppConfig (Code) | | Generic JDO application configuration. This object encapsulates the
basic functionality required to instantiate a set of properties and
a JDO persistence manager factory.
author: Dan Checkoway See Also: AppConfigFactory |
DEFAULT_CONNECTION_NAME | final public static String DEFAULT_CONNECTION_NAME(Code) | | |
AppConfig | public AppConfig()(Code) | | Constructor
|
AppConfig | public AppConfig(Properties props)(Code) | | Constructor from Properties
Parameters: props - the Properties to clone and use |
getAppConfig | public static AppConfig getAppConfig(String jndiConfigResource, String configFileSystemProperty, String defaultConfigFile)(Code) | | Convenience method for getting a new AppConfig instance.
Internally, this constructs an AppConfigFactory and returns
its configuration.
|
getAppConfig | public static AppConfig getAppConfig(String jndiConfigResource, String configFileSystemProperty, String defaultConfigFile, Class appConfigClass)(Code) | | Convenience method for getting a new AppConfig instance.
Internally, this constructs an AppConfigFactory and returns
its configuration.
|
getPersistenceManager | public PersistenceManager getPersistenceManager()(Code) | | Convenience method to get a persistence manager
a new persistence manager from the default persistencemanager factory See Also: PersistenceManager |
getPersistenceManager | public PersistenceManager getPersistenceManager(String name)(Code) | | Convenience method to get a persistence manager
Parameters: name - the name of the connection, used as a property prefix a new persistence manager from the persistence manager factoryidentified by the given name See Also: PersistenceManager |
getPersistenceManagerFactory | public PersistenceManagerFactory getPersistenceManagerFactory()(Code) | | Get the default persistence manager factory
the default persistence manager factory See Also: PersistenceManagerFactory |
getPersistenceManagerFactory | public PersistenceManagerFactory getPersistenceManagerFactory(String name)(Code) | | Get the associated persistence manager factory
Parameters: name - the name of the connection, used as a property prefix the persistence manager factory identified by the given name See Also: PersistenceManagerFactory |
getProperties | public Properties getProperties()(Code) | | Get the underlying properties that this object wraps
the underlying properties |
getProperty | public String getProperty(String propName)(Code) | | Get a property value
Parameters: propName - the name of the value to get the property value or null if not found |
getProperty | public String getProperty(String propName, String defaultValue)(Code) | | Get a property value with a default
Parameters: propName - the name of the value to get Parameters: defaultValue - the value to return if the given propertywas not explicitly set the property value or the default value |
loadProperties | protected void loadProperties(String propertyFileOrResource)(Code) | | Load properties from a file or resource
Parameters: propertyFileOrResource - the file or resource path to the givenproperties file; the file system is checked first, falling back onthe classpath |
loadProperties | protected void loadProperties(Properties newProps)(Code) | | Load and absorb a set of properties
Parameters: newProps - the properties to absorb |
setPropertiesFile | public void setPropertiesFile(String propertiesFile)(Code) | | This is called by the JRE or servlet engine resource manager.
The propertiesFile, usually a parameter to the JNDI resource,
should point to the properties file to be loaded.
|
|
|