public interface BuilderData
Definition of an interface that describes the parameters of a builder operation.
An implementation of this interface is used in calls of builder methods to pass all required parameters. There is a bunch of parameters supported by the builder, all of which must be defined so that the builder can work properly.
In addition to the input parameters required by the builder, the builder will
also store its results in this object. During the builder operation a
BeanStore
is created and populated, which can be
queried for obtaining objects created by the builder. Some constants define
reserved keys for typical objects involved in a builder operation. More of
these keys allowing access to typical builder results are defined by the
ComponentBuilderData
class.
There will be implementations of this interface that provide default values for many of the settings defined here. So an application won't have to bother with all. If not marked otherwise in the description of a getter method, the corresponding property is expected to be set by the application invoking the builder.
Modifier and Type | Field and Description |
---|---|
static String |
KEY_RESULT_WINDOW
Constant for the key under which the result window is stored.
|
Modifier and Type | Method and Description |
---|---|
ActionStore |
getActionStore()
Returns a reference to the action store.
|
BeanBuilderResult |
getBeanBuilderResult()
Returns the result of the bean builder.
|
Collection<BeanCreationListener> |
getBeanCreationListeners()
Returns a collection with objects to be registered as
BeanCreationListener at the BeanContext created during the
builder operation. |
BindingStrategy |
getBindingStrategy()
Returns the
BindingStrategy to be used by the form. |
Builder |
getBuilder()
Returns a reference to the
Builder object that generated the
builder results. |
BeanContext |
getBuilderContext()
Returns the bean context that is used by the builder and the created
components.
|
String |
getBuilderName()
Returns a name for the builder.
|
CommandQueue |
getCommandQueue()
Returns a reference to the global
CommandQueue object. |
Object |
getDefaultResourceGroup()
Returns the default resource group.
|
Object |
getFormBean()
Returns the form bean.
|
FormValidator |
getFormValidator()
Returns the
FormValidator for validating the Form object. |
InvocationHelper |
getInvocationHelper()
Returns the
InvocationHelper object to be used during this
builder operation. |
MessageOutput |
getMessageOutput()
Returns a reference to the
MessageOutput object to be used
by the builder and dependent objects. |
BeanContext |
getParentContext()
Returns a reference to the parent bean context.
|
Window |
getParentWindow()
Returns the parent window.
|
Map<String,Object> |
getProperties()
Returns a map with properties that should be available during the builder
operation.
|
BeanStore |
getRootStore()
Returns the root store created during the builder operation.
|
TransformerContext |
getTransformerContext()
Returns the transformer context to be used by the builder.
|
boolean |
isAutoRelease()
Returns the auto release flag.
|
boolean |
isMenuIcon()
Returns the value of the menu icon flag.
|
boolean |
isToolbarText()
Returns the value of the toolbar text flag.
|
void |
setBeanBuilderResult(BeanBuilderResult res)
Sets the result of the bean builder.
|
void |
setBuilder(Builder bldr)
Sets a reference to the
Builder that performs this builder
operation. |
void |
setBuilderContext(BeanContext ctx)
Sets the bean context used during the builder operation.
|
static final String KEY_RESULT_WINDOW
Object getDefaultResourceGroup()
TransformerContext getTransformerContext()
ActionStore getActionStore()
MessageOutput getMessageOutput()
MessageOutput
object to be used
by the builder and dependent objects. Components that need to output
messages to the user can make use of this object.MessageOutput
objectCommandQueue getCommandQueue()
CommandQueue
object.
This object can be used by the builder (or objects created by the
builder) if commands have to be issued.CommandQueue
String getBuilderName()
ifName
and unlessName
attributes. This
is a very easy means for supporting conditional execution of builder
scripts. Per default no builder name is set.boolean isMenuIcon()
boolean isToolbarText()
Object getFormBean()
BindingStrategy getBindingStrategy()
BindingStrategy
to be used by the form. The BindingStrategy
must be compatible with the model object used as form
bean, i.e. it determines the type of model objects that can be used.BindingStrategy
for the Form
getFormBean()
FormValidator getFormValidator()
FormValidator
for validating the Form
object.
This property is optional. If a FormValidator
is defined, input
validation on the form-level is performed before the data is stored in
the model object.FormValidator
Window getParentWindow()
BeanContext getParentContext()
BeanStore
set for the context - provides
access to the global bean definitions. These can be accessed during the
builder operation.Collection<BeanCreationListener> getBeanCreationListeners()
BeanCreationListener
at the BeanContext
created during the
builder operation. The objects contained in this collection are added
before the builder operation actually starts as listeners at the BeanContext
that can be queried through the getBuilderContext()
method. These listeners are triggered immediately for newly created
beans, even if beans are created during the builder operation. This is an
optional property; an implementation can return null if there are
no listeners to register.BeanCreationListener
objects to be
registered at the BeanContext
created by the builderMap<String,Object> getProperties()
BeanStore
is
possible. However, sometimes additional objects need to be passed to the
builder, for instance model objects for lists, tables, or tree views.
These additional objects can be passed through the map returned by this
method. This is more convenient than adding objects to the parent BeanStore
only for this purpose. The Builder
implementation
evaluates this map and ensures that its content is made available during
the execution of the builder script. An implementation is allowed to
return null if there are no additional properties.BeanContext getBuilderContext()
void setBuilderContext(BeanContext ctx)
ctx
- the new bean context used during the builder operationBeanBuilderResult getBeanBuilderResult()
BeanStore
objects created during the build. From
here access to the components created during the builder operation is
possible. This property is initialized by the builder.void setBeanBuilderResult(BeanBuilderResult res)
res
- the result object of the bean builderBeanStore getRootStore()
BeanBuilderResult
object.getBeanBuilderResult()
InvocationHelper getInvocationHelper()
InvocationHelper
object to be used during this
builder operation. This object is used for reflection operation and data
type conversions. If no InvocationHelper
is provided, a default
one is used by the builder. In most cases the default invocation helper
will be sufficient. It is initialized in a way that it can access
converters defined for the parent bean stores. If there are specific
requirements related to converters, a custom object can be returned here.InvocationHelper
to be usedboolean isAutoRelease()
Builder.release(BuilderData)
method is invoked. This is a very
convenient way to automatically free resources obtained during the
builder operation and used by the UI. Note that this flag is only
evaluated if a window is produced by the builder operation. If the flag
is set to false or if no window is generated by the builder
operation, the caller is responsible for releasing the results of the
builder. This can be done by passing this object to the builder's release()
method. (A reference to the builder is also stored in the
builder
property.)Builder getBuilder()
Builder
object that generated the
builder results. This property is set by the builder.Builder
usedvoid setBuilder(Builder bldr)
Builder
that performs this builder
operation. This method is called by the builder at the beginning of a
builder operation. Having a reference to the Builder
in the
BuilderData
object can be convenient, especially when the object
is to be released.bldr
- the Builder
performing the builder operationCopyright © 2016 The JGUIraffe Team. All rights reserved.