com.mkdoc.util
Class AbstractApplicationContext

java.lang.Object
  |
  +--com.mkdoc.util.AbstractApplicationContext
All Implemented Interfaces:
ApplicationContext
Direct Known Subclasses:
FileApplicationContext, PluginApplicationContext, ServletApplicationContext

public abstract class AbstractApplicationContext
extends java.lang.Object
implements ApplicationContext

Base superclass for application contexts.

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

Field Summary
protected  java.util.Map parameters
          A parameter map for additional set properties.
 
Fields inherited from interface com.mkdoc.util.ApplicationContext
ABSOLUTE, DIRECTORY, REPOSITORY
 
Constructor Summary
AbstractApplicationContext()
           
 
Method Summary
protected abstract  java.io.File getDefaultStoreDirectory()
          A template method to get a default store directory.
protected  java.lang.Class getMappedClass(java.lang.String name)
          Get a mapped parameter from this superclass.
protected  java.lang.String getMappedParameter(java.lang.String name)
          Get a mapped parameter from this superclass.
 java.io.File getStoreDirectory()
          Get the store directory.
 java.lang.String getStorePath()
          Get the reopsitory file path, if any.
 void setParameter(java.lang.String name, java.lang.String value)
          Set a parameter value.
 
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
getBooleanParameter, getClassParameter, getStringParameter
 

Field Detail

parameters

protected final java.util.Map parameters
A parameter map for additional set properties.

Since:
Version 0.3 2005-12-09
Constructor Detail

AbstractApplicationContext

public AbstractApplicationContext()
Method Detail

getStoreDirectory

public final java.io.File getStoreDirectory()
Get the store directory.

Specified by:
getStoreDirectory in interface ApplicationContext
Returns:
A reference to the default output directory, or a custom location if configured.
Since:
Version 0.1 2005-10-04

getStorePath

public final java.lang.String getStorePath()
Get the reopsitory file path, if any.

Specified by:
getStorePath in interface ApplicationContext
Returns:
An absolute file path, or null if not found.
Since:
Version 0.2 2005-10-14

getDefaultStoreDirectory

protected abstract java.io.File getDefaultStoreDirectory()
A template method to get a default store directory.

Returns:
A reference to the default output directory.
Since:
Version 0.2 2005-10-14

setParameter

public final void setParameter(java.lang.String name,
                               java.lang.String value)
Set a parameter value.

Specified by:
setParameter in interface ApplicationContext
Parameters:
name - The parameter name.
value - The parameter value.
Since:
Version 0.2 2005-10-14

getMappedParameter

protected final java.lang.String getMappedParameter(java.lang.String name)
Get a mapped parameter from this superclass.

Parameters:
name - The name of the parametr to get.
Returns:
The string value mapped to the parameter or null if not found.
Since:
Version 0.2 2005-12-14

getMappedClass

protected final java.lang.Class getMappedClass(java.lang.String name)
Get a mapped parameter from this superclass.

Parameters:
name - The name of the parametr to get.
Returns:
The string value mapped to the parameter or null if not found.
Since:
Version 0.2 2005-12-14