|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.matthias_burbach.flux.AbstractActionMappingGenerator
de.matthias_burbach.flux.NonModelledActionMappingGenerator
Preserves non-modelled action mappings by copying them from the old struts-config.xml to the new struts-config.xml's section 'Non-modelled Action Mappings'.
'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.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.xml.
Must be configured to be the last ActionMappingGenerator
in the
sequence of generator mappings in flux-config.xml to ensure proper results.
Field Summary |
Fields inherited from class de.matthias_burbach.flux.AbstractActionMappingGenerator |
settings |
Constructor Summary | |
NonModelledActionMappingGenerator()
|
Method Summary | |
void |
begin(StateMachine stateMachine,
org.jdom.Document oldDocument,
org.jdom.Element oldActionMappingsElement,
org.jdom.Document newDocument,
org.jdom.Element newActionMappingsElement)
Does nothing if the global setting 'PreserveNonModelledActionMappings' is not set to 'true'. |
protected void |
doBegin(StateMachine stateMachine,
org.jdom.Document oldDocument,
org.jdom.Element oldActionMappingsElement,
org.jdom.Document newDocument,
org.jdom.Element newActionMappingsElement)
Copies all old action mapping elements that were not (re-)generated so far to the section of 'Non-modelled Action Mappings'. |
protected boolean |
isNonModelled(org.jdom.Element actionMappingElement,
org.jdom.Element newActionMappingsElement)
Checks whether actionMappingElement was not generated
from the model into newActionMappingsElement
by a preceding ActionMappingGenerator , i. e. it is not modelled
(anymore). |
Methods inherited from class de.matthias_burbach.flux.AbstractActionMappingGenerator |
end, generate, generateForward, generateForward, generateForwards, generateProperty, getActionMappingElementForPath, getBasePath, getBasePathExtension, getDefaultName, getDefaultPackage, getDefaultType, getForwardElementForName, getForwardPath, getForwardPathPrefix, getForwardPathSuffix, getNamePartOfBasePath, setSettings |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NonModelledActionMappingGenerator()
Method Detail |
public void begin(StateMachine stateMachine, org.jdom.Document oldDocument, org.jdom.Element oldActionMappingsElement, org.jdom.Document newDocument, org.jdom.Element newActionMappingsElement) throws java.lang.Exception
doBegin(StateMachine, Document , Element, Document,
Element)
otherwise.
begin
in interface ActionMappingGenerator
begin
in class AbstractActionMappingGenerator
java.lang.Exception
protected void doBegin(StateMachine stateMachine, org.jdom.Document oldDocument, org.jdom.Element oldActionMappingsElement, org.jdom.Document newDocument, org.jdom.Element newActionMappingsElement) throws java.lang.Exception
This affects those mappings that never had or now don't have a correspondence in the model anymore from which they could be derived/generated.
stateMachine
- oldDocument
- oldActionMappingsElement
- newDocument
- newActionMappingsElement
-
java.lang.Exception
protected boolean isNonModelled(org.jdom.Element actionMappingElement, org.jdom.Element newActionMappingsElement) throws java.lang.Exception
actionMappingElement
was not generated
from the model into newActionMappingsElement
by a preceding ActionMappingGenerator
, i. e. it is not modelled
(anymore).
actionMappingElement
- the element to check fornewActionMappingsElement
- the elements that have been generated
so far
false
iff newActionMappingsElement
has an action mapping whose path attribute
equals the path of actionMappingElement
java.lang.Exception
- if anything goes unexpectedly wrong
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |