jodd.madvoc
Class Madvoc

java.lang.Object
  extended by jodd.madvoc.Madvoc

public class Madvoc
extends java.lang.Object

Maintain the lifecycle of a Madvoc WebApplication.


Field Summary
static java.lang.String MADVOC_ATTR
          Context attribute name.
protected  MadvocConfig madvocConfig
           
protected  java.lang.Class madvocConfiguratorClass
           
protected  java.lang.String madvocConfiguratorClassName
           
protected  MadvocController madvocController
           
static java.lang.String PARAM_MADVOC_CONFIGURATOR
          Madvoc configurator.
static java.lang.String PARAM_MADVOC_PARAMS
          List of Madvoc params and properties files to be found on classpath.
static java.lang.String PARAM_MADVOC_WEBAPP
          Web application.
protected  java.lang.String[] paramsFiles
           
protected  WebApplication webapp
           
protected  java.lang.Class webAppClass
           
protected  java.lang.String webAppClassName
           
 
Constructor Summary
Madvoc()
           
 
Method Summary
 void configure(javax.servlet.FilterConfig filterConfig)
          Configures Madvoc by reading filter init parameters.
 void configure(javax.servlet.ServletContext servletContext)
          Configures Madvoc by reading context init parameters.
protected  WebApplication createWebApplication()
          Loads WebApplication.
static Madvoc get(javax.servlet.ServletContext servletContext)
          Returns Madvoc instance from servlet context.
 MadvocConfig getMadvocConfig()
          Returns Madvoc controller once web application is started.
 MadvocController getMadvocController()
          Returns Madvoc controller once web application is started.
 WebApplication getWebApplication()
          Returns running web application.
protected  MadvocConfigurator loadMadvocConfig()
          Loads MadvocConfigurator.
protected  jodd.props.Props loadMadvocParams(java.lang.String[] patterns)
          Loads Madvoc parameters.
 void setMadvocConfiguratorClass(java.lang.Class madvocConfiguratorClass)
          Sets MadvocConfigurator class.
 void setMadvocConfiguratorClassName(java.lang.String madvocConfiguratorClassName)
          Sets MadvocConfigurator class name.
 void setParamsFiles(java.lang.String[] paramsFiles)
           
 void setWebAppClass(java.lang.Class webAppClass)
          Sets WebApplication class.
 void setWebAppClassName(java.lang.String webAppClass)
          Sets WebApplication class name.
 void startNewWebApplication(javax.servlet.ServletContext servletContext)
          Creates and starts new Madvoc web application.
 void stopWebApplication()
          Stops Madvoc web application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_MADVOC_WEBAPP

public static final java.lang.String PARAM_MADVOC_WEBAPP
Web application.

See Also:
Constant Field Values

PARAM_MADVOC_CONFIGURATOR

public static final java.lang.String PARAM_MADVOC_CONFIGURATOR
Madvoc configurator.

See Also:
Constant Field Values

PARAM_MADVOC_PARAMS

public static final java.lang.String PARAM_MADVOC_PARAMS
List of Madvoc params and properties files to be found on classpath.

See Also:
Constant Field Values

MADVOC_ATTR

public static final java.lang.String MADVOC_ATTR
Context attribute name.


webAppClassName

protected java.lang.String webAppClassName

webAppClass

protected java.lang.Class webAppClass

paramsFiles

protected java.lang.String[] paramsFiles

madvocConfiguratorClassName

protected java.lang.String madvocConfiguratorClassName

madvocConfiguratorClass

protected java.lang.Class madvocConfiguratorClass

webapp

protected WebApplication webapp

madvocController

protected MadvocController madvocController

madvocConfig

protected MadvocConfig madvocConfig
Constructor Detail

Madvoc

public Madvoc()
Method Detail

get

public static Madvoc get(javax.servlet.ServletContext servletContext)
Returns Madvoc instance from servlet context. May return null indicating Madvoc is not yet initialized.


setWebAppClassName

public void setWebAppClassName(java.lang.String webAppClass)
Sets WebApplication class name.


setWebAppClass

public void setWebAppClass(java.lang.Class webAppClass)
Sets WebApplication class.


setMadvocConfiguratorClassName

public void setMadvocConfiguratorClassName(java.lang.String madvocConfiguratorClassName)
Sets MadvocConfigurator class name.


setMadvocConfiguratorClass

public void setMadvocConfiguratorClass(java.lang.Class madvocConfiguratorClass)
Sets MadvocConfigurator class.


setParamsFiles

public void setParamsFiles(java.lang.String[] paramsFiles)

configure

public void configure(javax.servlet.FilterConfig filterConfig)
Configures Madvoc by reading filter init parameters.


configure

public void configure(javax.servlet.ServletContext servletContext)
Configures Madvoc by reading context init parameters.


getMadvocController

public MadvocController getMadvocController()
Returns Madvoc controller once web application is started.


getMadvocConfig

public MadvocConfig getMadvocConfig()
Returns Madvoc controller once web application is started.


getWebApplication

public WebApplication getWebApplication()
Returns running web application.


startNewWebApplication

public void startNewWebApplication(javax.servlet.ServletContext servletContext)
Creates and starts new Madvoc web application. Madvoc instance is stored in servlet context.


stopWebApplication

public void stopWebApplication()
Stops Madvoc web application.


createWebApplication

protected WebApplication createWebApplication()
Loads WebApplication. If class name is null, default web application will be loaded.


loadMadvocParams

protected jodd.props.Props loadMadvocParams(java.lang.String[] patterns)
Loads Madvoc parameters. New Props is created from the classpath.


loadMadvocConfig

protected MadvocConfigurator loadMadvocConfig()
Loads MadvocConfigurator. If class name is null, AutomagicMadvocConfigurator will be created.



Copyright © 2003-2012 Jodd Team