Flux - The Smart Struts Config Generator

The Flux project
SourceForge.net Logo

Preferences

Flux preferences can be configured in Eclipse under the menu Window/Preferences/Flux. The following table describes each preference.

Field Name Description Constraint
Model file pattern The name pattern of the UML model file, the new version of struts-config-<module>.xml is generated from. If the variable %MODULE% occurs in the pattern, it will be replaced by the module name of the selected struts-config-<module>.xml on execution of Flux. The model file must reside in the same directory as struts-config-<module>.xml to make this work. Is optional.

Flux checks whether the file exists.

Default form name pattern Flux adds the attribute name with a default value specified in this field to each newly created action mapping.

If the action mapping already exists in the old version Flux preserves the old value. If the old action mapping does not have a name attribute Flux will not add one.

If the variable %MODULE% occurs in the pattern, it will be replaced by the module name of the selected struts-config-<module>.xml on execution of Flux.

Is optional.
Framework dispatcher action class

Flux uses this value to set the type attribute of action mappings that do the form event dispatching.

Is mandatory.

Must be a valid, fully qualified Java Class Name.

The class must implement the Struts Action interface and execute a well-defined logic. Changes to this field normally only make sense if the class was renamed or sub classed.

Framework mode dispatcher action class

Flux uses this value to set the type attribute of action mappings that do the page mode dispatching.

Is mandatory.

Must be a valid, fully qualified Java Class Name.

The class must implement the Struts Action interface and execute a well-defined logic. Changes to this field normally only make sense if the class was renamed or sub classed.

Framework relay action class

Flux uses this value to set the type attribute of action mappings that continue the application flow when returning from a nested module.

Is mandatory.

Must be a valid, fully qualified Java Class Name.

The class must implement the Struts Action interface and execute a well-defined logic. Changes to this field normally only make sense if the class was renamed or sub classed.

Framework enter module action class

Flux uses this value to set the type attribute of action mappings that enter into another module.

Is mandatory.

Must be a valid, fully qualified Java Class Name.

The class must implement the Struts Action interface and execute a well-defined logic. Changes to this field normally only make sense if the class was renamed or sub classed.

Framework final state action class Flux uses this value to set the type attribute of the action mapping that is executed when the module reaches its final state. Is mandatory.

Must be a valid, fully qualified Java Class Name.

The class must implement the Struts Action interface and execute a well-defined logic. Changes to this field normally only make sense if the class was renamed or sub classed.

Prefix of default physical pages

Flux prepends this value to the forward attribute of action mappings that map from logical to physical pages.

If the action mapping already exists in the old version Flux preserves the old attribute value and ignores this prefix.

Is optional.

Since it is prepended to a path that has a leading slash this prefix must not end with a slash.

Suffix of default physical pages

Flux appends this value to the forward attribute of action mappings that map from logical to physical pages.

If the action mapping already exists in the old version Flux preserves the old attribute value and ignores this suffix.

Is optional.
Root module Flux treats the struts-config.xml as any struts-config-<module>.xml and uses this value as a pseudo module name for it in places where a module name is required. Is mandatory.

Must be a valid, non-empty name. Keep the default if possible.

Preserve non-modelled action mappings Preserves non-modelled action mappings by copying them from the old struts-config-<module>.xml to the new struts-config-<module>.xml's section 'Non-modelled Action Mappings' if this option is checked.

'Non-modelled' means, these action mappings would actually have to be deleted to maintain perfect consistency between the current UML model and the new struts-config-<module>.xml because they cannot be derived from anything that's in the model (anymore).

It is generally not recommended to keep these mappings because it reduces the completeness and potentially even the correctness of the model.

Situations may however arise where special mappings are needed that cannot be well expressed or maintained in the model. For these, hopefully rare cases 'non-modelled action mappings' might be the solution. In all other cases they should be manually deleted from the new struts-config-<module>.xml.

 
Generate page preprocessings Generates an extra level of indirection when forwarding to the physical page resource by adding an additional action mapping per logical page whose type is execute right before forwarding to the physical page resource.

This extra step is useful for preparatory work that should be performed by a Java class before rendering a JSP or a tile, for example.

These extra action mappings per logical page are omitted if this option is not checked. So, not checking the option produces behaviour equivalent to previous releases of Flux that didn't support this feature at all (< 1.2.3).

Can be overridden for selected struts-config files by setting the equally named Flux file property differently.

 
Create backup Flux produces an 'Update in Place' of the file struts-config-<module>.xml, but makes a backup copy in the same directory beforehand if this option is checked.

The backup will be named struts-config-<module>.xml.old.

The backup can be used for for a difference comparison with the new file or for a restore of the old version.