Class OperationHandlerUtil


  • public final class OperationHandlerUtil
    extends Object
    Utilities for Operation Handlers.
    • Method Detail

      • updateOperationInput

        public static void updateOperationInput​(Operation operation,
                                                Object input)

        Updates the input of an operation if the operation is an OperationChain or an Input.

        If the operation is an operation chain then the input will be set on the first operation if it is an Input operation with a null input.

        If the operation is an Input operation then the input will be set if the current input is null.

        Parameters:
        operation - the operation to update
        input - the new input to set on the operation.
      • getResultsOrNull

        public static Object getResultsOrNull​(Operation op,
                                              Context context,
                                              Store store)
                                       throws OperationException
        Executes and operation on the store and returns the results or null.
        Parameters:
        op - the operation to execute
        context - the user context
        store - the store to execute the operation on
        Returns:
        the results or null
        Throws:
        OperationException - if the store fails to execute the operation.