Class StandardOperation

java.lang.Object
org.springframework.restdocs.operation.StandardOperation
All Implemented Interfaces:
Operation

public class StandardOperation extends Object implements Operation
Standard implementation of Operation.
Author:
Andy Wilkinson
  • Constructor Details

    • StandardOperation

      public StandardOperation(String name, OperationRequest request, OperationResponse response, Map<String,Object> attributes)
      Creates a new StandardOperation.
      Parameters:
      name - the name of the operation
      request - the request that was sent
      response - the response that was received
      attributes - attributes to associate with the operation
  • Method Details

    • getAttributes

      public Map<String,Object> getAttributes()
      Description copied from interface: Operation
      Returns a Map of attributes associated with the operation.
      Specified by:
      getAttributes in interface Operation
      Returns:
      the attributes
    • getName

      public String getName()
      Description copied from interface: Operation
      Returns the name of the operation.
      Specified by:
      getName in interface Operation
      Returns:
      the name
    • getRequest

      public OperationRequest getRequest()
      Description copied from interface: Operation
      Returns the request that was sent.
      Specified by:
      getRequest in interface Operation
      Returns:
      the request
    • getResponse

      public OperationResponse getResponse()
      Description copied from interface: Operation
      Returns the response that was received.
      Specified by:
      getResponse in interface Operation
      Returns:
      the response