ISAC
is a Scenario Architecture for CLIF
Code Generation Rules
We will see what the code generation rules are during the manipulation of your Java class.
Add an action
- imports are added, if they are not exist. ( eg: import org.ow2.clif.scenario.isac.plugin.SampleAction; )
- implements type is added, if it is not exist. (eg: implements SessionObjectAction, SampleAction )
- a constant field is added, if it is not exist. (eg: static final int SAMPLE_GET = 0; )
- action method is added with a main switch in body, if it is not exist. (eg: public ActionEvent doSample(int number, Map params, ActionEvent report); )
- a switch case statement with constant reference is added, if it is not exist. (eg: case SAMPLE_GET: )
Add a parameter
- a constant is added, if it is not exist. (eg: static final String SAMPLE_GET_URI = "uri"; )
Modify an action
When you modify an action name, a rename refactoring will be done on your project (you will be prevent before and be able to stop the modification).
All action and parameter references and textual matches will be replace in your project, so your project still compile after the modification.
Modify a parameter
When you modify a parameter name, a rename refactoring will be done on your project (you will be prevent before and be able to stop the modification).
All parameter references and textual matches will be replace in your project, so your project still compile after the modification.
Remove an action
- If the constant field is used :
- A rename refactoring will be done and will add prefix 'OLDi_' before field name.
i is a incremental number. (eg: static final int OLD0_SAMPLE_GET = 0; )
- all parameters are removed. (see 'Remove a parameter' part)
- switch case statement(s) is commented. (eg: /*case SAMPLE_GET: 'user statements'*/ )
- Else :
- constant field is removed.
- switch case statement(s) is removed.
- if action is the last action of action type (sample, timers, ...), imports, interface type are removed and action method is commented.
Remove a parameter
- If the constant field is used :
- A rename refactoring will be done and will add prefix 'OLDi_' before field name.
i is a incremental number. (eg: static final String OLD0_SAMPLE_GET_URI = "uri"; )
- Else :
- constant field is removed.