org.apache.cayenne.conf
Class BasicServletConfiguration

java.lang.Object
  extended by org.apache.cayenne.conf.Configuration
      extended by org.apache.cayenne.conf.DefaultConfiguration
          extended by org.apache.cayenne.conf.BasicServletConfiguration

Deprecated. Since 1.2 ServletUtil is used instead, as the actual file loading strategy is defined at the ResourceLocator elevel, and this class provides no value of its own.

public class BasicServletConfiguration
extends DefaultConfiguration

BasicServletConfiguration is a Configuration that uses ServletContext to locate resources. This class can only be used in a context of a servlet/jsp container. It resolves configuration file paths relative to the web application "WEB-INF" directory.

BasicServletConfiguration is compatible with Servlet Specification 2.2 and higher. Also look at ServletConfiguration for the information how to utilize listeners introduced in Servlet Specification 2.3.

Author:
Andrei Adamchik, Scott Finnerty

Field Summary
static java.lang.String CONFIGURATION_PATH_KEY
          Deprecated.  
static java.lang.String DATA_CONTEXT_KEY
          Deprecated.  
protected  javax.servlet.ServletContext servletContext
          Deprecated.  
 
Fields inherited from class org.apache.cayenne.conf.Configuration
ACCEPT_ALL_DATAVIEWS, configurationShutdownHook, dataDomains, dataViewLocations, DEFAULT_CONFIGURATION_CLASS, DEFAULT_DOMAIN_FILE, DEFAULT_LOGGING_PROPS_FILE, domainConfigurationName, eventManager, ignoringLoadFailures, loaderDelegate, loadStatus, overrideFactory, projectVersion, saverDelegate, sharedConfiguration
 
Constructor Summary
BasicServletConfiguration()
          Deprecated.  
BasicServletConfiguration(javax.servlet.ServletContext ctxt)
          Deprecated.  
 
Method Summary
 boolean canInitialize()
          Deprecated. Default implementation of Configuration.canInitialize().
static DataContext getDefaultContext(javax.servlet.http.HttpSession session)
          Deprecated. Returns default Cayenne DataContext associated with the HttpSession.
 javax.servlet.ServletContext getServletContext()
          Deprecated. Returns current application context object.
static BasicServletConfiguration initializeConfiguration(javax.servlet.ServletContext ctxt)
          Deprecated.  
 void setServletContext(javax.servlet.ServletContext servletContext)
          Deprecated. Sets the servletContext.
 
Methods inherited from class org.apache.cayenne.conf.DefaultConfiguration
addClassPath, addResourcePath, didInitialize, getDomainConfiguration, getMapConfiguration, getResourceLocator, getViewConfiguration, initialize, setResourceLocator, toString
 
Methods inherited from class org.apache.cayenne.conf.Configuration
addDomain, bootstrapSharedConfiguration, configureCommonLogging, configureCommonLogging, configureLogging, getDataSourceFactory, getDataViewLocations, getDomain, getDomain, getDomainConfigurationName, getDomains, getEventManager, getLoaderDelegate, getLoadStatus, getLoggingLevel, getProjectVersion, getResourceLoader, getSaverDelegate, getSharedConfiguration, initializeSharedConfiguration, initializeSharedConfiguration, initializeSharedConfiguration, installConfigurationShutdownHook, isIgnoringLoadFailures, isLoggingConfigured, loadDataView, loadDataView, removeDomain, setDataSourceFactory, setDataViewLocations, setDomainConfigurationName, setEventManager, setIgnoringLoadFailures, setLoaderDelegate, setLoadStatus, setLoggingConfigured, setLoggingLevel, setProjectVersion, setSaverDelegate, shutdown, uninstallConfigurationShutdownHook
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONFIGURATION_PATH_KEY

public static final java.lang.String CONFIGURATION_PATH_KEY
Deprecated. 
See Also:
Constant Field Values

DATA_CONTEXT_KEY

public static final java.lang.String DATA_CONTEXT_KEY
Deprecated. 
See Also:
Constant Field Values

servletContext

protected javax.servlet.ServletContext servletContext
Deprecated. 
Constructor Detail

BasicServletConfiguration

public BasicServletConfiguration()
Deprecated. 

BasicServletConfiguration

public BasicServletConfiguration(javax.servlet.ServletContext ctxt)
Deprecated. 
Method Detail

initializeConfiguration

public static BasicServletConfiguration initializeConfiguration(javax.servlet.ServletContext ctxt)
Deprecated. 

getDefaultContext

public static DataContext getDefaultContext(javax.servlet.http.HttpSession session)
Deprecated. 
Returns default Cayenne DataContext associated with the HttpSession. If no DataContext exists in the session, it is created on the spot.


setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Deprecated. 
Sets the servletContext.

Parameters:
servletContext - The servletContext to set

getServletContext

public javax.servlet.ServletContext getServletContext()
Deprecated. 
Returns current application context object.


canInitialize

public boolean canInitialize()
Deprecated. 
Description copied from class: DefaultConfiguration
Default implementation of Configuration.canInitialize(). Creates a ResourceLocator suitable for loading from the CLASSPATH, unless it has already been set in a subclass. Always returns true.

Overrides:
canInitialize in class DefaultConfiguration


Copyright © 2001-2006 Apache.org All Rights Reserved.