|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.SDataServletContext
public class SDataServletContext
A class to hold the information that we want to hold for the whole servlet.
A single instance of this class is hung off the ServletContext (we only have one context; we do not run distributed). It is hung with a name that is the name of the class. REVIEW - This does not look quite right. Why does this hold the map but somebody else maintain the contents of the map? Surely this class should maintain the map.
Nested Class Summary | |
---|---|
static class |
SDataServletContext.Mode
The mode that the servlet is running: Host, Deployed or Test |
Constructor Summary | |
---|---|
SDataServletContext(javax.servlet.ServletContext context,
java.util.Map<java.lang.String,SDataProvider> providerMap)
creates an instance of the SDataServletContext class, sitting
under the given ServletContext and supporting the given list of
SDataProvider s. |
Method Summary | |
---|---|
java.lang.String |
getApplicationConfigPath(java.lang.String application)
Gets the path to the directory where the application's configuration information is stored |
java.lang.String |
getBasePath()
Gets the base path for the application; the location under which all the configuration files sit. |
java.lang.String |
getConfigurationPath()
Gets the path to the directory where configuration information is stored |
SDataServletContext.Mode |
getMode()
Gets the current running SDataServletContext.Mode and stores it in the static class
mode variable. |
java.util.Map<java.lang.String,SDataProvider> |
getProviderMap()
returns an immutable copy of the map of SDataProvider s. |
javax.servlet.ServletContext |
getServletContext()
Gets the ServletContext. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDataServletContext(javax.servlet.ServletContext context, java.util.Map<java.lang.String,SDataProvider> providerMap)
SDataServletContext
class, sitting
under the given ServletContext
and supporting the given list of
SDataProvider
s.
context
- the servlet context under which this context sitsproviderMap
- the map of application names to SDataProvider
application provider instances.Method Detail |
---|
public javax.servlet.ServletContext getServletContext()
public java.lang.String getBasePath()
public java.lang.String getConfigurationPath()
public java.lang.String getApplicationConfigPath(java.lang.String application)
application
- the name of the application, which must be one of the
applications in the context
public java.util.Map<java.lang.String,SDataProvider> getProviderMap()
SDataProvider
s.
Although the returned copy is immutable it remains current; changes to the original are reflected in the copy.
SDataProvider
s containing an immutable copy of
the context's map.public SDataServletContext.Mode getMode()
SDataServletContext.Mode
and stores it in the static class
mode variable.
SDataServletContext.Mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |