Class StandardOperation
java.lang.Object
org.springframework.restdocs.operation.StandardOperation
- All Implemented Interfaces:
Operation
Standard implementation of
Operation
.- Author:
- Andy Wilkinson
-
Constructor Summary
ConstructorDescriptionStandardOperation
(String name, OperationRequest request, OperationResponse response, Map<String, Object> attributes) Creates a newStandardOperation
. -
Method Summary
Modifier and TypeMethodDescriptionReturns aMap
of attributes associated with the operation.getName()
Returns the name of the operation.Returns the request that was sent.Returns the response that was received.
-
Constructor Details
-
StandardOperation
public StandardOperation(String name, OperationRequest request, OperationResponse response, Map<String, Object> attributes) Creates a newStandardOperation
.- Parameters:
name
- the name of the operationrequest
- the request that was sentresponse
- the response that was receivedattributes
- attributes to associate with the operation
-
-
Method Details
-
getAttributes
Description copied from interface:Operation
Returns aMap
of attributes associated with the operation.- Specified by:
getAttributes
in interfaceOperation
- Returns:
- the attributes
-
getName
Description copied from interface:Operation
Returns the name of the operation. -
getRequest
Description copied from interface:Operation
Returns the request that was sent.- Specified by:
getRequest
in interfaceOperation
- Returns:
- the request
-
getResponse
Description copied from interface:Operation
Returns the response that was received.- Specified by:
getResponse
in interfaceOperation
- Returns:
- the response
-