Class NamedOperation<I_ITEM,​O>

  • Type Parameters:
    I_ITEM - the input iterable item type
    O - the output type
    All Implemented Interfaces:
    Closeable, AutoCloseable, Input<Iterable<? extends I_ITEM>>, InputOutput<Iterable<? extends I_ITEM>,​O>, MultiInput<I_ITEM>, Output<O>, Operation, Operations<Operation>

    public class NamedOperation<I_ITEM,​O>
    extends Object
    implements InputOutput<Iterable<? extends I_ITEM>,​O>, MultiInput<I_ITEM>, Operation, Operations<Operation>
    Named operations enable encapsulation of an OperationChain into a new single NamedOperation. The NamedOperation can be added to OperationChains and executed, just like any other Operation. When run it executes the encapsulated OperationChain. There are various possible uses for NamedOperations, including:
    • making it simpler to run frequently used OperationChains
    • in a controlled way, allowing specific OperationChains to be run by a user that would not normally have permission to run them

    Named operations must take an iterable as an input but can produce any type of output.

    • Constructor Detail

      • NamedOperation

        public NamedOperation()
    • Method Detail

      • setParameters

        public void setParameters​(Map<String,​Object> parameters)
      • getOperationName

        public String getOperationName()
      • setOperationName

        public void setOperationName​(String operationName)
      • shallowClone

        public NamedOperation shallowClone()
        Description copied from interface: Operation
        Operation implementations should ensure a ShallowClone method is implemented. Performs a shallow clone. Creates a new instance and copies the fields across. It does not clone the fields. If the operation contains nested operations, these must also be cloned.
        Specified by:
        shallowClone in interface Operation
        Returns:
        shallow clone
      • getOptions

        public Map<String,​String> getOptions()
        Specified by:
        getOptions in interface Operation
        Returns:
        the operation options. This may contain store specific options such as authorisation strings or and other properties required for the operation to be executed. Note these options will probably not be interpreted in the same way by every store implementation.
      • setOptions

        public void setOptions​(Map<String,​String> options)
        Specified by:
        setOptions in interface Operation
        Parameters:
        options - the operation options. This may contain store specific options such as authorisation strings or and other properties required for the operation to be executed. Note these options will probably not be interpreted in the same way by every store implementation.