org.nuxeo.ecm.automation.core.impl
Class InvokableIteratorMethod
java.lang.Object
org.nuxeo.ecm.automation.core.impl.InvokableMethod
org.nuxeo.ecm.automation.core.impl.InvokableIteratorMethod
public class InvokableIteratorMethod
- extends InvokableMethod
A method proxy which accept as input only iterable inputs. At invocation time
it iterates over the input elements and invoke the real method using the
current input element as the input.
The result is collected into a OutputCollector
as specified by the
OperationMethod
annotation.
This proxy is used (instead of the default InvokableMethod
) when an
operation is defining an output collector in the OperationMethod
annotation so that iterable inputs are automatically handled by the chain
executor.
This specialized implementation is declaring the same consume type as its
non-iterable counterpart. But at runtime it consumes any Iterable of the
cosume type.
To correctly generate the operation documentation the
OperationTypeImpl
is checking if the method is iterable or not
through isIterable()
to declare the correct consume type.
- Author:
- Bogdan Stefanescu
InvokableIteratorMethod
public InvokableIteratorMethod(OperationType op,
Method method,
OperationMethod anno)
isIterable
public boolean isIterable()
- Overrides:
isIterable
in class InvokableMethod
inputMatch
public int inputMatch(Class<?> in)
- Description copied from class:
InvokableMethod
- Return 0 for no match.
- Overrides:
inputMatch
in class InvokableMethod
Copyright © 2011 Nuxeo SAS. All Rights Reserved.