*/
public class OperationsMetadataParser {
public static OperationDefinition parseOperationDescriptor(OperationDescriptor operationDescriptor)
throws InvalidPluginDescriptorException {
String name = operationDescriptor.getName();
OperationDefinition operationDefinition = new OperationDefinition(operationDescriptor.getName(), // TODO display name
"", ///operationDescriptor.getVersion().getMatch(), // TODO build the version embedded object
operationDescriptor.getDescription());
operationDefinition.setParametersConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor
.getName(), operationDescriptor.getParameters()));
operationDefinition.setResultsConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor
.getName(), operationDescriptor.getResults()));
operationDefinition.setTimeout(operationDescriptor.getTimeout());
String displayName = operationDescriptor.getDisplayName();
if ((displayName == null) || displayName.equals("")) {
displayName = StringUtils.deCamelCase(name);
}
operationDefinition.setDisplayName(displayName);
return operationDefinition;
}