Commit fa3470f1 authored by Pietro Braghieri's avatar Pietro Braghieri
Browse files

Update OSLC_README.md

parent 92d7de60
......@@ -55,7 +55,7 @@ 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.
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:
We have to work only on the OSLC client side, following these steps:
##### Client Side
Suppose that the `wholeArchitecture` attribute is already present in the class `eu.fbk.tools.adapter.ocra.CheckValidationProperty.java`.
......@@ -99,10 +99,46 @@ case ToolParameterConstants.PARAM_BEHAVIOUR_MODEL:
break;
```
#### Add a new Automation Plan
Suppose we have already defined a new function (e.g. `GenerateMiterArchitecture`) and we want to implement the remote version.
We have to work on both the client side and the server side following these steps:
##### Client Side
As described in the previous case, we need to implement the `getParameters()` and `setParameters()` methods, according to the function parameters.
```
@Override
public List<ToolFunctionParameter> getParameters()
{
final List<ToolFunctionParameter> parameters = super.getParameters();
if( componentsMapping != null)
{
parameters.addAll(getMapParameter(ToolParameterConstants.PARAM_COMPONENTS_MAPPING, componentsMapping));
}
return parameters;
}
@Override
public void setParameters(List<ToolFunctionParameter> parameters)
{
for( ToolFunctionParameter parameter : parameters )
{
switch( parameter.name )
{
case ToolParameterConstants.PARAM_COMPONENTS_MAPPING:
componentsMapping = setMapParameter(ToolParameterConstants.PARAM_COMPONENTS_MAPPING, parameters);
break;
default:
setParameter(parameter);
break;
}
}
}
```
##### Server Side
No changes are needed.
#### Add a new Automation Plan
#### Web Server Installation
......
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