public abstract class ActionRegistry
extends java.lang.Object
ActionRegistry allows tvc plugins to register
custom struts actions and/or struts form beans that has been annotated
instead of having to maintain this information in a struts-xml file.| Modifier and Type | Method and Description |
|---|---|
static void |
registerAction(java.lang.Class<? extends com.technia.tvc.struts.action.Action> c)
Registers an action class using annotations.
|
static void |
registerActions(java.lang.Class<? extends com.technia.tvc.struts.action.Action>... clazzes)
Convenient method that accepts a variable amount of actions to be
registered.
|
static void |
registerForm(java.lang.Class<? extends com.technia.tvc.struts.action.ActionForm> c)
Registers an action-form class using annotations.
|
static void |
registerForms(java.lang.Class<? extends com.technia.tvc.struts.action.ActionForm>... clazzes)
Convenient method that accepts a variable amount of action form classes
to be registered.
|
static void |
registerGlobalForward(java.lang.String name,
java.lang.String path,
boolean redirect)
Registers a global action forward.
|
static void |
registerPackage(java.lang.String packageName,
boolean includeSubPackages)
Allows registering actions / action forms from a given package.
|
public static void registerPackage(java.lang.String packageName,
boolean includeSubPackages)
packageName - The name of the package, example
"com.foo.bar.actions".includeSubPackages - True if to also scan sub-packages for actions /
action formspublic static void registerGlobalForward(java.lang.String name,
java.lang.String path,
boolean redirect)
name - The name of the global forwardpath - The path to the resource.redirect - True to use client side redirect to the forward page.@SafeVarargs public static void registerForms(java.lang.Class<? extends com.technia.tvc.struts.action.ActionForm>... clazzes)
This method calls registerForm(Class) for each argument.
clazzes - The classes to be registeredpublic static void registerForm(java.lang.Class<? extends com.technia.tvc.struts.action.ActionForm> c)
The registration is done via your init method inside your TVCPlugin.
c - The class to be registered.java.lang.NullPointerException - If the class argument is null.java.lang.IllegalStateException - If you try to register the action outside
of your init() method in your TVCPlugin.@SafeVarargs public static void registerActions(java.lang.Class<? extends com.technia.tvc.struts.action.Action>... clazzes)
This method calls registerAction(Class) for each argument.
clazzes - The classes to be registeredpublic static void registerAction(java.lang.Class<? extends com.technia.tvc.struts.action.Action> c)
The registration is done via your init method inside your TVCPlugin.
c - The class to be registered.java.lang.NullPointerException - If the class argument is null.java.lang.IllegalStateException - If you try to register the action outside
of your init() method in your TVCPlugin.Copyright ? Technia AB. All Rights Reserved.