Commit 74744d95 authored by Pietro Braghieri's avatar Pietro Braghieri
Browse files

Update OSLC_README.md

parent e3a4788b
......@@ -53,10 +53,26 @@ For example, to get the list the available Automation Plans, calls the end point
---
#### Extend an existing Automation Plan
Suppose you want to extend an analysis tool function by adding a new parameter.
Suppose you want to extend an analysis tool function by adding a new parameter.
For example, we need to add the parameter `wholeArchitecture` of type `boolean` to the function `Check Contract Validation Property`.
We have to work on both the client side and the server side following these steps:
##### Client Side
##### Client Side
Suppose that the `wholeArchitecture` attribute is already present in the class `eu.fbk.tools.adapter.ocra.CheckContractRefinement.java`.
* Add `String PARAM_WHOLE_ARCHITECTURE = "wholeArchitecture"` to the class `eu.fbk.tools.adapter.ToolParameterConstants.java`
* Insert the following fragment in the `getParameters()` method
```
if( wholeArchitecture != null)
{
parameters.add(new ToolFunctionParameter(ToolParameterConstants.PARAM_WHOLE_ARCHITECTURE, wholeArchitecture.toString()));
}
```
* Insert the following fragment in the `setParameters(ToolFunctionParameter parameter)` method
```
case ToolParameterConstants.PARAM_WHOLE_ARCHITECTURE:
wholeArchitecture = Boolean.valueOf(parameter.value);
break;
```
##### Server Side
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment