com.mkdoc.servlet
Class ServletApplicationContext

java.lang.Object
  |
  +--com.mkdoc.util.AbstractApplicationContext
        |
        +--com.mkdoc.servlet.ServletApplicationContext
All Implemented Interfaces:
ApplicationContext

public class ServletApplicationContext
extends AbstractApplicationContext
implements ApplicationContext

A servlet application context.

Version:
0.5 2005-12-09
Author:
Philip Shaw

Field Summary
static java.lang.String STORE_PATH
          The default store file path, relative to the application context path.
 
Fields inherited from class com.mkdoc.util.AbstractApplicationContext
parameters
 
Fields inherited from interface com.mkdoc.util.ApplicationContext
ABSOLUTE, DIRECTORY, REPOSITORY
 
Constructor Summary
ServletApplicationContext(javax.servlet.ServletContext context)
          Provide a wrapper for a servlet context.
 
Method Summary
 boolean getBooleanParameter(java.lang.String name)
          Get a named parameter value.
 java.lang.Class getClassParameter(java.lang.String name)
          Get a named parameter value.
protected  java.io.File getDefaultStoreDirectory()
          Get the default store directory.
 java.lang.String getStringParameter(java.lang.String name)
          Get a named parameter value.
 
Methods inherited from class com.mkdoc.util.AbstractApplicationContext
getMappedClass, getMappedParameter, getStoreDirectory, getStorePath, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.mkdoc.util.ApplicationContext
getStoreDirectory, getStorePath, setParameter
 

Field Detail

STORE_PATH

public static final java.lang.String STORE_PATH
The default store file path, relative to the application context path.

Since:
Version 0.3 2005-10-14
See Also:
Constant Field Values
Constructor Detail

ServletApplicationContext

public ServletApplicationContext(javax.servlet.ServletContext context)
Provide a wrapper for a servlet context.

Parameters:
context - A context obtained from the servlet container.
Since:
Version 0.1 2005-07-12
Method Detail

getStringParameter

public final java.lang.String getStringParameter(java.lang.String name)
Get a named parameter value.

Specified by:
getStringParameter in interface ApplicationContext
Parameters:
name - The name of the parameter to look up.
Returns:
The value of the named parameter, or null if not found.
Since:
Version 0.1 2005-07-12

getClassParameter

public final java.lang.Class getClassParameter(java.lang.String name)
Get a named parameter value.

Specified by:
getClassParameter in interface ApplicationContext
Parameters:
name - The name of the parameter to look up.
Returns:
A reference to the class of the named parameter, or null if there is a problem loading the class.
Since:
Version 0.1 2005-07-12

getBooleanParameter

public final boolean getBooleanParameter(java.lang.String name)
Get a named parameter value.

Specified by:
getBooleanParameter in interface ApplicationContext
Parameters:
name - The name of the parameter to look up.
Returns:
The boolean value of named parameter, or false if not found.
Since:
Version 0.1 2005-07-12

getDefaultStoreDirectory

protected final java.io.File getDefaultStoreDirectory()
Get the default store directory.

Specified by:
getDefaultStoreDirectory in class AbstractApplicationContext
Returns:
A reference to the default output directory.
Since:
Version 0.2 2005-10-14