| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.matthias_burbach.flux.AbstractActionMappingGenerator
Abstract base class for ActionMappingGenerator implementations
 that provides commonly used functionality.
| Field Summary | |
protected  java.util.Properties | 
settings
The global settings that are used to control the generation process  | 
| Constructor Summary | |
AbstractActionMappingGenerator()
 | 
|
| Method Summary | |
 void | 
begin(StateMachine stateMachine,
      org.jdom.Document oldDocument,
      org.jdom.Element oldActionMappingsElement,
      org.jdom.Document newDocument,
      org.jdom.Element newActionMappingsElement)
Is an empty default implementation.  | 
 void | 
end(StateMachine stateMachine,
    org.jdom.Document oldDocument,
    org.jdom.Element oldActionMappingsElement,
    org.jdom.Document newDocument,
    org.jdom.Element newActionMappingsElement)
Is an empty default implementation.  | 
 void | 
generate(StateMachine stateMachine,
         State state,
         org.jdom.Document oldDocument,
         org.jdom.Element oldActionMappingsElement,
         org.jdom.Document newDocument,
         org.jdom.Element newActionMappingsElement)
Is an empty default implementation.  | 
protected  void | 
generateForward(java.lang.String forwardName,
                java.lang.String forwardPath,
                org.jdom.Document document,
                org.jdom.Element oldActionMappingElement,
                org.jdom.Element newActionMappingElement)
Calls generateForward(
                   String forwardName, 
                   String forwardPath, 
                   Document document, 
                   Element oldActionMappingElement, 
                   Element newActionMappingElement,
                   List additionalAttributes) 
 adding null as last parameter. | 
protected  void | 
generateForward(java.lang.String forwardName,
                java.lang.String forwardPath,
                org.jdom.Document document,
                org.jdom.Element oldActionMappingElement,
                org.jdom.Element newActionMappingElement,
                java.util.List additionalAttributes)
Generates a single <forward> element and adds it to newActionMappingElement. | 
protected  void | 
generateForwards(State state,
                 org.jdom.Document newDocument,
                 org.jdom.Element newActionMappingElement,
                 org.jdom.Element oldActionMappingElement)
Generates all forward elements for the newActionMappingElement from the outbound transitions
 of the state.
  | 
protected  void | 
generateProperty(java.lang.String propertyName,
                 java.lang.String propertyValue,
                 org.jdom.Document document,
                 org.jdom.Element actionMappingElement)
Generates a <set-property> element and adds it to the actionMappingElement. | 
protected  org.jdom.Element | 
getActionMappingElementForPath(org.jdom.Element actionMappingsElement,
                               java.lang.String path)
Selects the <action> element with the given path 
 from the actionMappingsElement. | 
protected  java.lang.String | 
getBasePath(State state)
 | 
protected  java.lang.String | 
getBasePathExtension(State state)
The base path extension may suffix the base path to make a full path of an <action> or <forward> element.  | 
protected  java.lang.String | 
getDefaultName()
 | 
protected  java.lang.String | 
getDefaultPackage()
 | 
protected  java.lang.String | 
getDefaultType(State state)
 | 
protected  org.jdom.Element | 
getForwardElementForName(org.jdom.Element actionMappingElement,
                         java.lang.String name)
Selects the <forward> element with the given name 
 from the actionMappingElement. | 
protected  java.lang.String | 
getForwardPath(java.lang.String forwardName,
               State targetState,
               java.lang.String parameters)
Constructs a forward path which mainly depends on the target state's stereotype.  | 
protected  java.lang.String | 
getForwardPathPrefix()
 | 
protected  java.lang.String | 
getForwardPathSuffix()
 | 
protected  java.lang.String | 
getNamePartOfBasePath(State state)
 | 
 void | 
setSettings(java.util.Properties settings)
Is called at the beginning of the generation before any other method.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected java.util.Properties settings
| Constructor Detail | 
public AbstractActionMappingGenerator()
| Method Detail | 
public void setSettings(java.util.Properties settings)
ActionMappingGenerator
setSettings in interface ActionMappingGeneratorsettings - holds simple properties that can be used by the
                 generator to control the generation
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
begin in interface ActionMappingGeneratorstateMachine - the UML state machine to generate fromoldDocument - the previously generated version of the complete 
                    XML outputoldActionMappingsElement - the previously generated version of the
                                 <action-mappings> elementnewDocument - the XML output being under constructionnewActionMappingsElement - the <action-mappings> element being
                                 under construction and to add children to
java.lang.Exception - if anything goes unexpectedly wrong, will cancel the
                   generation process
public void generate(StateMachine stateMachine,
                     State state,
                     org.jdom.Document oldDocument,
                     org.jdom.Element oldActionMappingsElement,
                     org.jdom.Document newDocument,
                     org.jdom.Element newActionMappingsElement)
              throws java.lang.Exception
generate in interface ActionMappingGeneratorstateMachine - the UML state machine to generate fromstate - the current UML state to generate fromoldDocument - the previously generated version of the complete 
                    XML outputoldActionMappingsElement - the previously generated version of the
                                 <action-mappings> elementnewDocument - the XML output being under constructionnewActionMappingsElement - the <action-mappings> element being
                                 under construction and to add children to
java.lang.Exception - if anything goes unexpectedly wrong, will cancel the
                   generation process
public void end(StateMachine stateMachine,
                org.jdom.Document oldDocument,
                org.jdom.Element oldActionMappingsElement,
                org.jdom.Document newDocument,
                org.jdom.Element newActionMappingsElement)
         throws java.lang.Exception
end in interface ActionMappingGeneratorstateMachine - the UML state machine to generate fromoldDocument - the previously generated version of the complete 
                    XML outputoldActionMappingsElement - the previously generated version of the
                                 <action-mappings> elementnewDocument - the XML output being under constructionnewActionMappingsElement - the <action-mappings> element being
                                 under construction and to add children to
java.lang.Exception - if anything goes unexpectedly wrong, will cancel the
                   generation processprotected java.lang.String getDefaultType(State state)
state - the state the default Java type is to be derived from
protected java.lang.String getDefaultName()
null if not specifiedprotected java.lang.String getDefaultPackage()
protected void generateForwards(State state,
                                org.jdom.Document newDocument,
                                org.jdom.Element newActionMappingElement,
                                org.jdom.Element oldActionMappingElement)
                         throws java.lang.Exception
newActionMappingElement from the outbound transitions
 of the state.
 The transitions' labels (event names or guard conditions)
 become the forwards' names.
state - the state whose transitions are transformed into forwardsnewDocument - the struts-config document being generatednewActionMappingElement - the <action-mappings> element 
                                the forwards will be added tooldActionMappingElement - the previously generated version of the
                                <action-mappings> element
java.lang.Exception - if anything goes unexpectedly wrong
protected void generateForward(java.lang.String forwardName,
                               java.lang.String forwardPath,
                               org.jdom.Document document,
                               org.jdom.Element oldActionMappingElement,
                               org.jdom.Element newActionMappingElement)
                        throws java.lang.Exception
generateForward(
                   String forwardName, 
                   String forwardPath, 
                   Document document, 
                   Element oldActionMappingElement, 
                   Element newActionMappingElement,
                   List additionalAttributes) 
 adding null as last parameter.
java.lang.Exception
protected void generateForward(java.lang.String forwardName,
                               java.lang.String forwardPath,
                               org.jdom.Document document,
                               org.jdom.Element oldActionMappingElement,
                               org.jdom.Element newActionMappingElement,
                               java.util.List additionalAttributes)
                        throws java.lang.Exception
newActionMappingElement.
forwardName - the name of the forward to be generatedforwardPath - the path of the forward to be generated if not taken
                    from the previous version of the 
                    <action-mappings> elementdocument - the struts-config document being generatedoldActionMappingElement - the previous version of the 
                                <action-mappings> elementnewActionMappingElement - the element the forward is to be added to
java.lang.Exception - if anything goes unexpectedly wrongprotected java.lang.String getBasePath(State state)
state - the state the base path is to be derived from
protected java.lang.String getNamePartOfBasePath(State state)
state - the state the name part of the base path is to be derived 
              from
protected java.lang.String getBasePathExtension(State state)
state - the state the extension is to be derived from
protected java.lang.String getForwardPath(java.lang.String forwardName,
                                          State targetState,
                                          java.lang.String parameters)
                                   throws java.lang.Exception
forwardName - the name of the forward the path is used fortargetState - the target state the path is to be derived fromparameters - optional parameter(s) that will be attached after "?",
        must not be preceded by "?" or "&", must be separated by "&" if 
        multi-valued
java.lang.Exception - if anything goes unexpectedly wrongprotected java.lang.String getForwardPathPrefix()
protected java.lang.String getForwardPathSuffix()
protected org.jdom.Element getForwardElementForName(org.jdom.Element actionMappingElement,
                                                    java.lang.String name)
                                             throws java.lang.Exception
name 
 from the actionMappingElement.
actionMappingElement - the element to select the child forward fromname - the name of the <forward> element to be selected
java.lang.Exception - if anything goes unexpectedly wrong
protected org.jdom.Element getActionMappingElementForPath(org.jdom.Element actionMappingsElement,
                                                          java.lang.String path)
                                                   throws java.lang.Exception
path 
 from the actionMappingsElement.
actionMappingsElement - the element to select the child action frompath - the path of the <action> element to be selected
java.lang.Exception - if anything goes unexpectedly wrong
protected void generateProperty(java.lang.String propertyName,
                                java.lang.String propertyValue,
                                org.jdom.Document document,
                                org.jdom.Element actionMappingElement)
actionMappingElement.
propertyName - the value of the property attributepropertyValue - the value of the value attributedocument - the struts-config document being generatedactionMappingElement - the <action> element the property is
                             to be added to
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||