@Override
public OperationFunctions collect(OperationPipeline pipeline) {
List<Function> funcs = Lists.newArrayList();
TransformationId tfId = null;
HostedWebServicePipelineBrowser browser = new HostedWebServicePipelineBrowser(pipeline);
Transformation first = browser.getFirstTransformation();
if (first != null) {
funcs.add(first);
tfId = first.getID();
// For backwards compatibility: do not add the second transformation to the list if the
// first transformation is null
Transformation second = browser.getSecondTransformation();
if (second != null) {
funcs.add(second);
}
}
return new OperationFunctions(funcs, tfId);