|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.conf.Configuration
org.apache.cayenne.conf.DefaultConfiguration
public class DefaultConfiguration
Subclass of Configuration that uses the System CLASSPATH to locate resources.
Field Summary | |
---|---|
protected ResourceLocator |
locator
|
Fields inherited from class org.apache.cayenne.conf.Configuration |
---|
configurationShutdownHook, dataDomains, dataViewLocations, DEFAULT_CONFIGURATION_CLASS, DEFAULT_DOMAIN_FILE, domainConfigurationName, eventManager, ignoringLoadFailures, loaderDelegate, loadStatus, overrideFactory, overrideStrategy, projectVersion, saverDelegate, sharedConfiguration |
Constructor Summary | |
---|---|
DefaultConfiguration()
Default constructor. |
|
DefaultConfiguration(String domainConfigurationName)
Constructor with a named domain configuration resource. |
|
DefaultConfiguration(String domainConfigurationName,
ResourceLocator locator)
Creates DefaultConfiguration with specified cayenne project file name and ResourceLocator. |
Method Summary | |
---|---|
void |
addClassPath(String customPath)
Adds a custom path for class path lookups. |
void |
addResourcePath(String path)
Adds the given String as a custom path for resource lookups. |
protected InputStream |
getDomainConfiguration()
Returns a DataDomain as a stream or null if it cannot be found. |
protected ResourceFinder |
getResourceFinder()
Returns ResourceFinder associated with this Configuration that is to be
used for config files lookup. |
protected ResourceLocator |
getResourceLocator()
Deprecated. since 3.0 as super is deprecated. |
void |
initialize()
Initializes all Cayenne resources. |
protected void |
setResourceLocator(ResourceLocator locator)
Sets the specified ResourceLocator . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ResourceLocator locator
Constructor Detail |
---|
public DefaultConfiguration()
DefaultConfiguration(String)
with
Configuration.DEFAULT_DOMAIN_FILE
as argument.
public DefaultConfiguration(String domainConfigurationName)
Configuration.Configuration(String)
.
ConfigurationException
- when domainConfigurationName
is
null
.Configuration.Configuration(String)
public DefaultConfiguration(String domainConfigurationName, ResourceLocator locator)
Method Detail |
---|
public void addClassPath(String customPath)
conf = new DefaultConfiguration(); conf.addClassPath("my/package/name"); Configuration.initializeSharedConfiguration(conf);
public void addResourcePath(String path)
IllegalArgumentException
- if path
is null
.protected InputStream getDomainConfiguration()
Configuration
null
if it cannot be found.
getDomainConfiguration
in class Configuration
public void initialize() throws Exception
initialize
in class Configuration
Exception
protected ResourceLocator getResourceLocator()
getResourceLocator
in class Configuration
protected ResourceFinder getResourceFinder()
Configuration
ResourceFinder
associated with this Configuration that is to be
used for config files lookup.
getResourceFinder
in class Configuration
protected void setResourceLocator(ResourceLocator locator)
ResourceLocator
. Currently called from
initialize()
.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |