Most of the model elements will require a stereotype to be processed correctly, below you will find
a table indicating on which model element you may put what stereotype, it will also
denote which effect this has on the generation process.
Sometimes it happens you want to add information to the model but there is no clean way of doing it.
In those cases you may want to resort to tagged values, but these cases should be considered with
caution. A tagged value is something extra, something optional, and the application should
run fine without them.
Bpm4struts allows you to add tagged values here and there but provides a default value
in case they are missing.
AndroMDA BPM4Struts Cartridge Profile
This profile contains all elements that can be applied on the model used as the
MDA transformation process. These elements are specific to the AndroMDA BPM4Struts Cartridge component.
Data Types
@TODO: write the documentation for 'Data Types' profile element group !!!
Stereotypes
Stereotypes are the names you sometimes see appear in UML diagrams, they typically look
like <<MyStereotype>> and can be applied on any type of UML model element.
Tagged Values
Sometimes it happens you want to add information to the model but there is no clean way
of doing it. In those cases you may want to resort to tagged values, but these cases should
be considered with caution. A tagged value is something extra, something optional,
and the application should run fine without them.
Bpm4struts allows you to add tagged values here and there but provides a
default value in case they are missing.
FrontEndException
(Back to Stereotypes)
|
Applied on: Transition |
Modeled on a transition it designates an exception occuring while processing an action,
must exit an action state and enter a JSP page.
|
FrontEndSessionObject
(Back to Stereotypes)
|
Applied on: Class |
These classes can be associated to controllers. They represent objects that persist
during the session of the user. For each such session object associated with a controller
the controller will have accessor methods for this object. Use a dependency from the controller
to the session object to properly model this relationship, a controller can depend on many
such session objects; and in the same way a session object might be shared between controllers.
|
@andromda.presentation.web.action.tablelink
(Back to Tagged Values)
|
Applied on: Transition coming out of an action state carrying the <<FrontEndView>> stereotype |
Denotes this action applies on the information shown in a tabular format, you will need to specify
the name of the table as the value, optionally suffix with a dot and the name of the column.
If the column is specified the action will be rendered in that specific column, otherwise a new
column will be created for it.
|
@andromda.presentation.web.action.form.key
(Back to Tagged Values)
|
Applied on: A <<FrontEndUseCase>> |
Denotes the key used to store this use-case's action forms under.
This feature is useful when you are using Struts Tiles to execute more than one action at the
same time; an example would be a sidebar such as a menu
that automatically reloads on each request, you will not want this sidebar's action to collide
with the form from the other 'real' action.
Please note that using this feature in combination with passing parameters across use-cases
will not work, only use this feature for use-cases that stand on their own.
|
Allowed values for this element:
form (default)
any string is allowed
|
@andromda.presentation.view.field.required
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Denotes whether or not this is a required field. If a field is required its type will always be
checked (you cannot enter a String value when an int is expected)
|
Allowed values for this element:
|
@andromda.presentation.web.view.field.rows
(Back to Tagged Values)
|
Applied on:
Parameter coming out of an action state carrying the <<FrontEndView>> stereotype,
while having @andromda.presentation.web.view.field.textarea
|
Denotes the number of rows on a textarea field.
|
Allowed values for this element:
5 (default)
any strictly positive integer
|
@andromda.presentation.view.field.format
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
The format of this field's value.
Type |
Value |
Arguments |
Example |
Description |
int, float, double, java.lang.Integer, java.lang.Float, java.lang.Double |
range |
2 of this type |
range 2 12 |
Specifies in which range the value of this attribute must fall |
java.util.Date, java.sql.Date |
N/A |
[strict] (format) |
strict dd/MM/yyyy |
The format in which dates need to be specified (optionally strict) (*) |
java.lang.String |
minlength |
an integer value |
minlength 4 |
Specifies the minimum number of characters |
java.lang.String |
maxlength |
an integer value |
maxlength 4 |
Specifies the maximum number of characters |
java.lang.String |
pattern |
a regular expression |
pattern [a-zA-Z]* |
Validates format according to a regular expression (**), the leading
'^' and trailing '$' must not be specified |
java.lang.String |
creditcard |
N/A |
creditcard |
Validates the value to be a creditcard number, according to what is known as the Luhn check |
java.lang.String |
email |
N/A |
email |
Checks if the specified value is a possible email address, IP addresses are also taken into account,
you may specify this format in combination with other validator format, the only requirement is
that when you specify 'email' it should be the last sequence of characters;
delimit those validators using a space |
(*) The format is specified by the java.text.SimpleDateFormat class from the Java 2 SDK, please
refer to the JavaDoc documentation of that class for more information, this format is case-sensitive
SimpleDateFormat JavaDoc
(**) The pattern expression is a Perl regular expression as you would you use in Javascript,
by convention it requires the ^ and $ to denote respectively the beginning and ending of the pattern
Netscape's guide to regular expressions in Javascript
|
Allowed values for this element:
Any of the formats listed above
|
@andromda.presentation.web.view.field.type
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Indicates the type of parameter, this information will be used when rendering the pages,
possible values are: link, multibox, text, textarea, checkbox, radio, select, password,
hidden and plaintext.
One of the tables below give some more information about field formats, for a list of
possible types see
this page
|
Allowed values for this element:
text (default)
select
password
hidden
textarea
checkbox
radio
link
multibox
|
@andromda.presentation.view.field.multibox
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Can only be used in combination with
@andromda.presentation.web.view.field.type=multibox in a table. This tagged value
specified the incoming page-variable that is holding the values to match against. If
a match is found the checkbox will be checked for the corresponding row.
|
Allowed values for this element:
any name of a page-variable that is a datatype::Collection type
|
@andromda.presentation.view.field.radio
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Can be used in combination with the @andromda.presentation.web.view.field.type=radio
tagged value. Use it to specify the number of options to render, the values of these
options will always be the same, alternatively
you can specify a comma-separated list of runtime properties if you prefer the values
to be updateable at runtime. If this tagged value is not specified the cartridge will
assume it to have value '3'.
|
Allowed values for this element:
a strictly positive integer
3 (default)
|
@andromda.presentation.web.view.field.validwhen
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Additional validation to be performed, specify a
Struts-validator condition here, see
Struts-Validator
and go to the section labeled
http://struts.apache.org/struts-action/userGuide/building_view.html#validator . The required
parentheses will automatically be placed around your condition.
|
Allowed values for this element:
a Struts 'validwhen' condition
|
@andromda.presentation.web.view.field.validators
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Custom validation to be performed, you can add one or more of your own validators here.
Make sure you add your validator definitions in validator-rules.xml ,
there is a
merge point
that can be used to have them automatically inserted.
Validator values look like this: myValidator ,
myValidator(myVar=myArg) ,
myValidator(myVar=myArg,myVar2=myArg2) , etc...
Specify each validator using a new value, don't specify all of them in a single value.
Be careful when using multiple validators with the same 'var' name, the last one
found will be used! Normally speaking this should not happen, so try to avoid it
(I recommend against using names used by known validators: minlength,
test, datePattern, ...)
|
Allowed values for this element:
a call to one of your custom validators
|
@andromda.presentation.web.view.field.tablelink
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
The value is of the format table.column where
table denotes a parameter coming into
the page of type Collection (and containing a tagged value
to indicate it is to be displayed as a table); the
column part is used to indicate which column of
the corresponding table is to be used for linking.
The result will be that the specified table column will contain
a hyperlink reference to the action on which this parameter
resides, this is useful to eg. display a list of persons and view
their details by simply clicking on their names in the table
(for that to work this parameter's type should be 'link', use the
@andromda.presentation.web.view.field.type=link tagged value for that).
The column name is optional, if you do not specify it the name
of the parameter will be assumed.
By setting the parameter type you can have any widget rendered into the table.
|
Allowed values for this element:
any name of a table page-variable that is a datatype::Collection type followed by a dot
and the name of the target column
|
@andromda.presentation.web.view.field.reset
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Indicates whether or not the field should be reset (to its orginal value)
after the execution of the action. This is useful when you want only
some of the parameters reset on the form but not all of them.
|
Allowed values for this element:
|
@andromda.presentation.view.table.columns
(Back to Tagged Values)
|
Applied on:
Parameter of type datatype::Collection
going into an action state carrying the <<FrontEndView>> stereotype
|
The collection will be displayed in tabular format using the
<display:*>
tag-library. Each column in this table will be mapped to a property of the object
type contained in the collection. So you will need to make sure all objects
have accessor methods for the property you list in this tagged value.
Properties are separated using a comma ','. More than one value maybe be assigned to
this tag, all properties will correctly be resolved.
|
Allowed values for this element:
a comma-separated list of column names
|
@andromda.presentation.view.table.maxrows
(Back to Tagged Values)
|
Applied on:
Parameter of type datatype::Collection
going into an action state carrying the <<FrontEndView>> stereotype
|
This value represents the maximum number of entries shown at the same time,
also known as the 'page size'. If the number of entries is a number greater
than this value then a list of pages will be displayed to jump to the other values.
|
Allowed values for this element:
a strictly positive integer
15 (default)
|
@andromda.presentation.view.table.export
(Back to Tagged Values)
|
Applied on:
Parameter of type datatype::Collection
going into an action state carrying the <<FrontEndView>> stereotype
|
Denotes the different formats into which it should be possible to export the list
The tagged value may be assigned multiple values, use a combination of
csv , xml , pdf and excel .
By default it is possible to export to all known formats. You may use the
none value to disable exporting for this table, this value will take
priority over any other ones if specified.
|
Allowed values for this element:
xml (default)
csv (default)
excel (default)
pdf (default)
|
@andromda.struts.view.table.decorator
(Back to Tagged Values)
|
Applied on:
Parameter of type datatype::Collection
going into an action state carrying the <<FrontEndView>> stereotype
|
Whether or not to generate a displaytag table decorator for this table. Can be used
in combination with the generateTableDecorators namespace property.
|
Allowed values for this element:
|
@andromda.manageable.table.maxlistsize
(Back to Tagged Values)
|
Applied on: A class with the <<Manageable>> stereotype |
The maximum number of rows to fetch from the database in a single operation. Tune this parameter
to avoid downloading thousands of rows each time, most of the time the user will want to use
the search facility to refine the result set
|
Allowed values for this element:
a strictly positive integer
250 (default)
|
@andromda.manageable.table.displayname
(Back to Tagged Values)
|
Applied on: A class with the <<Manageable>> stereotype |
The column representing this entity,by default the first <<Unique>> attribute found
is taken but you might want to specify another column yourself. This value is used when one entity
has a foreign key to another one and you want to select the value of this foreign key
from a combobox and you would like to see a more meaningful label for each option, if no
<<Unique>> attribute is found the identifier is used, which isn't very helpful.
|
Allowed values for this element:
any column name present in this entity
the name of the identifier column (default)
|
@andromda.manageable.table.resolveable
(Back to Tagged Values)
|
Applied on: Association end to a class with the <<Manageable>> stereotype |
Whether or not the assocation to another entity should be represented using a combobox. You might
want to disable this feature if you are sure the target entity can have many different values
(meaning a table with lots of records).
|
Allowed values for this element:
|