|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjodd.io.findfile.FindClass
jodd.madvoc.config.AutomagicMadvocConfigurator
public class AutomagicMadvocConfigurator
Default Madvoc configurator uses auto-magic to configure WebApplication
.
It searches the class path for all classes which names ends with 'Action', 'Result'
and 'Configurator' suffixes. Each such class will be loaded and introspected to determine
if it represents valid Madvoc entity and then registered into the web application.
Action class is scanned for the MadvocAction
. All public methods of the action class
are candidates for the actions, unless if not annotated differently.
Interceptors may be defined both for all actions on class level or for the action itself.
Configuration classes are loaded during the search, but they are invoked after the classpath scanning ends.
The latest step is applying the default configurations, such as default interceptors to all registered actions.
Field Summary | |
---|---|
protected java.lang.String |
actionClassSuffix
|
protected java.lang.String |
configClassSuffix
|
protected long |
elapsed
|
protected boolean |
registerNonExistingActionsOnly
|
protected java.lang.String |
resultClassSuffix
|
protected WebApplication |
webapp
|
Fields inherited from class jodd.io.findfile.FindClass |
---|
createInputStream, excludedJars, excludedPackages, includedJars, includedPackages |
Constructor Summary | |
---|---|
AutomagicMadvocConfigurator()
|
Method Summary | |
---|---|
boolean |
checkClass(java.lang.Class clazz)
|
void |
configure(WebApplication webapp)
Configures web application from system classpath |
void |
configure(WebApplication webapp,
java.net.URL[] classpath)
Configures web application from specified classpath. |
protected void |
onActionClass(java.lang.String className)
Builds action configuration on founded action class. |
protected void |
onClassName(java.lang.String className,
java.io.InputStream inputStream)
Parses class name that matches madvoc-related names. |
protected void |
onConfigClass(java.lang.String className)
Creates madvoc configuration from founded MadvocConfigurator instance. |
protected void |
onResultClass(java.lang.String className)
Loads madvoc result from founded ActionResult instance. |
Methods inherited from class jodd.io.findfile.FindClass |
---|
getExcludedJars, getExcludedPackages, getIncludedJars, getIncludedPackages, scanClassName, scanClassPath, scanJarFile, scanUrl, setExcludedJars, setExcludedPackages, setIncludedJars, setIncludedPackages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WebApplication webapp
protected java.lang.String actionClassSuffix
protected java.lang.String configClassSuffix
protected java.lang.String resultClassSuffix
protected boolean registerNonExistingActionsOnly
protected long elapsed
Constructor Detail |
---|
public AutomagicMadvocConfigurator()
Method Detail |
---|
public void configure(WebApplication webapp)
configure
in interface MadvocConfigurator
configure(jodd.madvoc.WebApplication, java.net.URL[])
public void configure(WebApplication webapp, java.net.URL[] classpath)
configure(jodd.madvoc.WebApplication)
protected void onClassName(java.lang.String className, java.io.InputStream inputStream)
onClassName
in class jodd.io.findfile.FindClass
public boolean checkClass(java.lang.Class clazz)
protected void onActionClass(java.lang.String className)
MadvocAction
annotation.
protected void onConfigClass(java.lang.String className)
MadvocConfigurator
instance.
All founded configurations will be invoked at the end of auto-magic process.
protected void onResultClass(java.lang.String className)
ActionResult
instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |