public class Madvoc
extends java.lang.Object
WebApplication.| Modifier and Type | Field and Description |
|---|---|
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 javax.servlet.ServletContext |
servletContext |
protected WebApplication |
webapp |
protected java.lang.Class |
webAppClass |
protected java.lang.String |
webAppClassName |
| Constructor and Description |
|---|
Madvoc() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String PARAM_MADVOC_WEBAPP
public static final java.lang.String PARAM_MADVOC_CONFIGURATOR
public static final java.lang.String PARAM_MADVOC_PARAMS
public static final java.lang.String MADVOC_ATTR
protected java.lang.String webAppClassName
protected java.lang.Class webAppClass
protected java.lang.String[] paramsFiles
protected java.lang.String madvocConfiguratorClassName
protected java.lang.Class madvocConfiguratorClass
protected WebApplication webapp
protected MadvocController madvocController
protected MadvocConfig madvocConfig
protected javax.servlet.ServletContext servletContext
public static Madvoc get(javax.servlet.ServletContext servletContext)
Madvoc instance from servlet context.
May return null indicating Madvoc
is not yet initialized.public void setWebAppClassName(java.lang.String webAppClass)
WebApplication class name.public void setWebAppClass(java.lang.Class webAppClass)
WebApplication class.public void setMadvocConfiguratorClassName(java.lang.String madvocConfiguratorClassName)
MadvocConfigurator class name.public void setMadvocConfiguratorClass(java.lang.Class madvocConfiguratorClass)
MadvocConfigurator class.public void setParamsFiles(java.lang.String[] paramsFiles)
public void configure(javax.servlet.FilterConfig filterConfig)
public void configure(javax.servlet.ServletContext servletContext)
public MadvocController getMadvocController()
public MadvocConfig getMadvocConfig()
public WebApplication getWebApplication()
public void startNewWebApplication(javax.servlet.ServletContext servletContext)
Madvoc web application.
Madvoc instance is stored in servlet context.
Important: servletContext may be null,
when web application is run out from container.public void stopWebApplication()
protected WebApplication createWebApplication()
WebApplication. If class name is null,
default web application will be loaded.protected jodd.props.Props loadMadvocParams(java.lang.String[] patterns)
Props is created from the classpath.protected MadvocConfigurator loadMadvocConfig()
Copyright © 2003-2013 Jodd Team