public class ApplicationBuilderData extends Object implements BuilderData
The application specific default implementation of the BuilderData
interface.
This class provides meaningful implementations of all methods required by the
BuilderData
interface. An instance can be obtained from the
ApplicationContext
class that is already initialized with predefined
values for many fields. So a client need not bother with all of the data
supported by this interface, but has only to set the values it is specially
interested in.
Implementation note: this class is not thread-safe. The typical usage
scenario is that an instance is requested from ApplicationContext
,
initialized with the properties required by the application and passed to a
builder.
ApplicationContext.initBuilderData()
KEY_RESULT_WINDOW
Constructor and Description |
---|
ApplicationBuilderData()
Creates a new instance of
ApplicationBuilderData . |
Modifier and Type | Method and Description |
---|---|
void |
addBeanCreationListener(BeanCreationListener l)
Adds the specified
BeanCreationListener to this object. |
void |
addBeanCreationListeners(Collection<? extends BeanCreationListener> listeners)
Adds all
BeanCreationListener objects contained in the given
collection to this object. |
void |
addProperty(String key,
Object value)
Adds an additional property for the builder operation.
|
ActionStore |
getActionStore()
Returns the action store.
|
BeanBuilderResult |
getBeanBuilderResult()
Returns the result object from the bean builder.
|
Collection<BeanCreationListener> |
getBeanCreationListeners()
Returns a collection with
BeanCreationListener objects to be
registered at the BeanContext created by the builder. |
BindingStrategy |
getBindingStrategy()
Returns the
BindingStrategy used by the current form. |
Builder |
getBuilder()
Returns a reference to the
Builder instance that processed this
object. |
BeanContext |
getBuilderContext()
Returns the bean context used by the builder.
|
String |
getBuilderName()
Returns the name of the builder.
|
CommandQueue |
getCommandQueue()
Returns the
CommandQueue . |
Object |
getDefaultResourceGroup()
Returns the default resource group.
|
Object |
getFormBean()
Returns the form bean.
|
FormValidator |
getFormValidator()
Returns the
FormValidator for validating the current form. |
InvocationHelper |
getInvocationHelper()
Returns the
InvocationHelper . |
MessageOutput |
getMessageOutput()
Returns the
MessageOutput object. |
BeanContext |
getParentContext()
Returns the parent bean context.
|
Window |
getParentWindow()
Returns the parent window.
|
Map<String,Object> |
getProperties()
Returns a map with additional properties for the builder operation.
|
BeanStore |
getRootStore()
Returns the root store populated by the builder.
|
TransformerContext |
getTransformerContext()
Returns the transformer context.
|
boolean |
isAutoRelease()
Returns the auto release flag.
|
boolean |
isMenuIcon()
Returns the menu icon flag.
|
boolean |
isToolbarText()
Returns the toolbar text flag.
|
void |
setActionStore(ActionStore actionStore)
Sets the action store.
|
void |
setAutoRelease(boolean autoRelease)
Sets the auto release flag.
|
void |
setBeanBuilderResult(BeanBuilderResult res)
Sets the result object for the bean builder.
|
void |
setBindingStrategy(BindingStrategy strat)
Sets the
BindingStrategy to be used by the current form. |
void |
setBuilder(Builder builder)
Sets the
Builder that processed this object. |
void |
setBuilderContext(BeanContext ctx)
Sets the bean context used by the builder.
|
void |
setBuilderName(String builderName)
Sets a name for the builder.
|
void |
setCommandQueue(CommandQueue commandQueue)
Sets the
CommandQueue . |
void |
setDefaultResourceGroup(Object defaultResourceGroup)
Sets the default resource group.
|
void |
setFormBean(Object formBean)
Sets the form bean.
|
void |
setFormValidator(FormValidator validator)
Sets the
FormValidator for validating the current form. |
void |
setInvocationHelper(InvocationHelper invocationHelper)
Sets the
InvocationHelper . |
void |
setMenuIcon(boolean menuIcon)
Sets the menu icon flag.
|
void |
setMessageOutput(MessageOutput messageOutput)
Sets the
MessageOutput object. |
void |
setParentContext(BeanContext ctx)
Sets the parent bean context.
|
void |
setParentWindow(Window parentWindow)
Sets the parent window.
|
void |
setProperties(Map<String,Object> props)
Sets additional properties for the builder operation.
|
void |
setToolbarText(boolean toolbarText)
Sets the toolbar text flag.
|
void |
setTransformerContext(TransformerContext transformerContext)
Sets the transformer context.
|
public ApplicationBuilderData()
ApplicationBuilderData
.public ActionStore getActionStore()
getActionStore
in interface BuilderData
public void setActionStore(ActionStore actionStore)
actionStore
- the actionStorepublic Object getDefaultResourceGroup()
getDefaultResourceGroup
in interface BuilderData
public void setDefaultResourceGroup(Object defaultResourceGroup)
defaultResourceGroup
- the default resource grouppublic Object getFormBean()
getFormBean
in interface BuilderData
public void setFormBean(Object formBean)
formBean
- the form beanpublic BindingStrategy getBindingStrategy()
BindingStrategy
used by the current form.getBindingStrategy
in interface BuilderData
BindingStrategy
BuilderData.getFormBean()
public void setBindingStrategy(BindingStrategy strat)
BindingStrategy
to be used by the current form.strat
- the BindingStrategy
public FormValidator getFormValidator()
FormValidator
for validating the current form.getFormValidator
in interface BuilderData
FormValidator
public void setFormValidator(FormValidator validator)
FormValidator
for validating the current form. If no
FormValidator
is set, no form-level validation is performed. The
form's fields may be validated though if corresponding validators have
been defined.validator
- the FormValidator
public boolean isMenuIcon()
isMenuIcon
in interface BuilderData
public void setMenuIcon(boolean menuIcon)
menuIcon
- the flag valuepublic Window getParentWindow()
getParentWindow
in interface BuilderData
public void setParentWindow(Window parentWindow)
parentWindow
- the parent windowpublic boolean isToolbarText()
isToolbarText
in interface BuilderData
public void setToolbarText(boolean toolbarText)
toolbarText
- the toolbar text flagpublic TransformerContext getTransformerContext()
getTransformerContext
in interface BuilderData
public void setTransformerContext(TransformerContext transformerContext)
transformerContext
- the transformer contextpublic BeanBuilderResult getBeanBuilderResult()
getBeanBuilderResult
in interface BuilderData
public void setBeanBuilderResult(BeanBuilderResult res)
setBeanBuilderResult
in interface BuilderData
res
- the results of the bean builderpublic BeanContext getParentContext()
getParentContext
in interface BuilderData
public void setParentContext(BeanContext ctx)
ctx
- the parent bean contextpublic BeanStore getRootStore()
getRootStore
in interface BuilderData
IllegalStateException
- if no builder results are available yetBuilderData.getBeanBuilderResult()
public BeanContext getBuilderContext()
getBuilderContext
in interface BuilderData
public void setBuilderContext(BeanContext ctx)
setBuilderContext
in interface BuilderData
ctx
- the builder's bean contextpublic InvocationHelper getInvocationHelper()
InvocationHelper
.getInvocationHelper
in interface BuilderData
InvocationHelper
public void setInvocationHelper(InvocationHelper invocationHelper)
InvocationHelper
.invocationHelper
- the InvocationHelper
public MessageOutput getMessageOutput()
MessageOutput
object.getMessageOutput
in interface BuilderData
public void setMessageOutput(MessageOutput messageOutput)
MessageOutput
object.messageOutput
- the message output objectpublic CommandQueue getCommandQueue()
CommandQueue
.getCommandQueue
in interface BuilderData
public void setCommandQueue(CommandQueue commandQueue)
CommandQueue
.commandQueue
- the command queuepublic Collection<BeanCreationListener> getBeanCreationListeners()
BeanCreationListener
objects to be
registered at the BeanContext
created by the builder. Note: this
collection cannot be modified.getBeanCreationListeners
in interface BuilderData
BeanCreationListener
objectspublic void addBeanCreationListener(BeanCreationListener l)
BeanCreationListener
to this object. It will
be registered at the BeanContext
created by the builder and thus
notified for all bean created by the
dependency injection framework.l
- the BeanCreationListener
to be added (must not be
null)IllegalArgumentException
- if the BeanCreationListener
is
nullpublic void addBeanCreationListeners(Collection<? extends BeanCreationListener> listeners)
BeanCreationListener
objects contained in the given
collection to this object. They will be registered at the BeanContext
created by the builder and thus notified for all bean
created by the dependency injection framework.listeners
- the collection with BeanCreationListener
objects
(must not be null)IllegalArgumentException
- if the collection is null or
contains null elementspublic Builder getBuilder()
Builder
instance that processed this
object. This value is available only after the Builder
was
called.getBuilder
in interface BuilderData
Builder
that processed this BuilderData
objectpublic void setBuilder(Builder builder)
Builder
that processed this object. This method is
called by the Builder
instance during the builder operation.setBuilder
in interface BuilderData
builder
- the Builder
public String getBuilderName()
getBuilderName
in interface BuilderData
public void setBuilderName(String builderName)
ComponentBuilderData
object). It can be used
for conditional execution of builder scripts.builderName
- the name of the builderpublic boolean isAutoRelease()
isAutoRelease
in interface BuilderData
public void setAutoRelease(boolean autoRelease)
Builder.release(BuilderData)
on the Builder
responsible.
Note that the default value of this flag is true, so auto release
is enabled per default.autoRelease
- the value of the auto release flagpublic Map<String,Object> getProperties()
setProperties(Map)
or the one that was created automatically when #addProperty()
was
called. Result may also be null if no properties have been set.getProperties
in interface BuilderData
setProperties(Map)
,
addProperty(String, Object)
public void setProperties(Map<String,Object> props)
props
- the map with additional propertiespublic void addProperty(String key, Object value)
getProperties()
. If no map with properties has been set yet, a
new one is created (getProperties()
will return this new map).
Otherwise, the property is added to the existing map.key
- the key of the propertyvalue
- the value of the propertyCopyright © 2016 The JGUIraffe Team. All rights reserved.