public class ActionBuilder extends Object implements SimpleBeanStoreImpl.BeanContributor
A central data class used during the action builder process.
This class holds all information needed during the processing of Jelly
scripts with actions and related tags. An instance is stored in the Jelly
context and can be accessed by all interested components. The role of this
class is almost analogous to the
ComponentBuilderData
class in the form builder package.
By implementing the BeanContributor
interface this class makes
some of its managed objects available to the dependency injection framework.
These are the following:
ActionStore
can be accessed under their name with the prefix
"action:".ActionStore
itself is available under the
name "ACTION_STORE".Modifier and Type | Field and Description |
---|---|
static String |
KEY_ACTION_BUILDER
Constant for the key for accessing the instance of this class from the
builder's bean context.
|
static String |
KEY_ACTION_PREFIX
Constant for the prefix used for accessing actions.
|
static String |
KEY_ACTION_STORE
Constant for the key for accessing the action store from the builder's
bean context.
|
Constructor and Description |
---|
ActionBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
beanNames(Set<String> names)
Obtains the names of the beans supported by this bean contributor.
|
static ActionBuilder |
get(org.apache.commons.jelly.JellyContext context)
Returns the instance of this class stored in the specified Jelly context.
|
ActionManager |
getActionManager()
Returns a reference to the action manager.
|
ActionStore |
getActionStore()
Returns a reference to the current action store.
|
Object |
getBean(String name)
Returns the bean with the given name.
|
org.apache.commons.jelly.JellyContext |
getContext()
Returns the current
JellyContext this object lives in. |
void |
initBeanStore(SimpleBeanStoreImpl store)
Initializes the specified bean store object.
|
boolean |
isMenuIcon()
Returns the value of the menu icon flag.
|
boolean |
isToolbarText()
Returns the value of the toolbar text flag.
|
void |
put(org.apache.commons.jelly.JellyContext context)
Stores this object in the given Jelly context.
|
void |
setActionManager(ActionManager actionManager)
Sets the action manager.
|
void |
setActionStore(ActionStore actionStore)
Sets the action store.
|
void |
setMenuIcon(boolean menuIcon)
Sets the value of the menu icon flag.
|
void |
setToolbarText(boolean toolbarText)
Sets the value of the toolbar text flag.
|
public static final String KEY_ACTION_STORE
public static final String KEY_ACTION_BUILDER
public static final String KEY_ACTION_PREFIX
public ActionStore getActionStore()
public void setActionStore(ActionStore actionStore)
actionStore
- the action storepublic ActionManager getActionManager()
public void setActionManager(ActionManager actionManager)
actionManager
- the action manager to usepublic boolean isMenuIcon()
public void setMenuIcon(boolean menuIcon)
menuIcon
- the value of the flagpublic boolean isToolbarText()
public void setToolbarText(boolean toolbarText)
toolbarText
- the value of the flagpublic org.apache.commons.jelly.JellyContext getContext()
JellyContext
this object lives in. This
property is initialized when this instance is stored in a context.JellyContext
public void beanNames(Set<String> names)
beanNames
in interface SimpleBeanStoreImpl.BeanContributor
names
- the set to which to add the namespublic Object getBean(String name)
getBean
in interface SimpleBeanStoreImpl.BeanContributor
name
- the name of the beanNoSuchElementException
- if an unknown action is requestedpublic void initBeanStore(SimpleBeanStoreImpl store)
BeanContext
used during the builder
operation is constructed. This implementation will add the static beans
to the given store and register this object as
BeanContributor
.store
- the store to be initializedpublic void put(org.apache.commons.jelly.JellyContext context)
context
- the context (must not be null)IllegalArgumentException
- if the context is nullpublic static ActionBuilder get(org.apache.commons.jelly.JellyContext context)
context
- the Jelly contextCopyright © 2016 The JGUIraffe Team. All rights reserved.