public static enum ActContextInjection.InjectType extends java.lang.Enum<ActContextInjection.InjectType>
Define how framework should inject AppContext to the controller action handler
Enum Constant and Description |
---|
FIELD
Inject AppContext into controller instance field.
|
LOCAL
Save AppContext to
ContextLocal . |
PARAM
Pass AppContext via controller action method call.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isField() |
boolean |
isLocal() |
boolean |
isParam() |
static ActContextInjection.InjectType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ActContextInjection.InjectType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActContextInjection.InjectType FIELD
ActionContext
static
Framework must instantiate an new instance of the controller before calling the action handler method
public static final ActContextInjection.InjectType PARAM
public static final ActContextInjection.InjectType LOCAL
ContextLocal
. If none of
the FIELD
and PARAM
can be used to inject the
AppContext
, then framework shall call ActionContext.saveLocal()
method to save the app context instance into thread local variable, such that the
application developer could use ActionContext.current()
method to
access the current application contextpublic static ActContextInjection.InjectType[] values()
for (ActContextInjection.InjectType c : ActContextInjection.InjectType.values()) System.out.println(c);
public static ActContextInjection.InjectType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isLocal()
public boolean isField()
public boolean isParam()
Copyright © 2014–2017 ActFramework. All rights reserved.