public class AutomagicMadvocConfigurator extends java.lang.Object implements MadvocComponentLifecycle.Init, MadvocComponentLifecycle.Start
WebApp
.
It searches the class path for all classes which names ends with 'Action' and 'Result'
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 with Action
are registered as Madvoc actions.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actionClassSuffix |
protected ActionConfigManager |
actionConfigManager |
protected ActionsManager |
actionsManager |
protected long |
elapsed |
protected static byte[] |
MADVOC_COMPONENT_ANNOTATION |
protected java.util.List<java.lang.Runnable> |
madvocComponents |
protected MadvocContainer |
madvocContainer |
protected java.util.List<java.lang.Runnable> |
webappConfigurations |
Constructor and Description |
---|
AutomagicMadvocConfigurator() |
AutomagicMadvocConfigurator(ClassScanner classScanner) |
Modifier and Type | Method and Description |
---|---|
protected void |
acceptActionClass(java.lang.Class<?> actionClass)
Builds action runtime configuration on founded action class.
|
protected void |
acceptMadvocComponentClass(java.lang.Class componentClass)
Registers new Madvoc component.
|
protected boolean |
checkClass(java.lang.Class clazz)
Determines if class should be examined for Madvoc annotations.
|
protected java.lang.String |
createInfoMessage() |
void |
init() |
protected void |
registerAsConsumer(ClassScanner classScanner)
Parses class name that matches madvoc-related names.
|
void |
start() |
@PetiteInject protected ActionConfigManager actionConfigManager
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected MadvocContainer madvocContainer
protected java.lang.String actionClassSuffix
protected long elapsed
protected static final byte[] MADVOC_COMPONENT_ANNOTATION
protected java.util.List<java.lang.Runnable> webappConfigurations
protected java.util.List<java.lang.Runnable> madvocComponents
public AutomagicMadvocConfigurator()
public AutomagicMadvocConfigurator(ClassScanner classScanner)
public void init()
init
in interface MadvocComponentLifecycle.Init
public void start()
start
in interface MadvocComponentLifecycle.Start
protected java.lang.String createInfoMessage()
protected void registerAsConsumer(ClassScanner classScanner)
protected boolean checkClass(java.lang.Class clazz)
NoClassDefFoundError
;
we should continue searching anyway.protected void acceptActionClass(java.lang.Class<?> actionClass)
MadvocAction
annotation.protected void acceptMadvocComponentClass(java.lang.Class componentClass)
Copyright © 2003-present Jodd Team