Interface for classes that can build a response
- Source:
Methods
(static) withFormatterManager(formatterManager) → {ResponseBuilder}
Sets the FormatterManager of the response
Parameters:
Name | Type | Description |
---|---|---|
formatterManager |
FormatterManager | The FormatterManager for use with the response |
Returns:
The instance of the ResponseBuilder
- Type
- ResponseBuilder
build() → {Object}
Builds the final response based on all of the mergining
- Source:
Returns:
JSON that represents the response
- Type
- Object
withFormatterManager(formatterManager) → {ResponseBuilder}
Sets the FormatterManager of the response
Parameters:
Name | Type | Description |
---|---|---|
formatterManager |
FormatterManager | The FormatterManager for use with the response |
- Source:
Returns:
The instance of the ResponseBuilder
- Type
- ResponseBuilder
withJSON(json) → {ResponseBuilder}
The passed in JSON will be merged with a response definition
Parameters:
Name | Type | Description |
---|---|---|
json |
Object | JSON that matches the parts of a response definition that is to be set |
- Source:
Returns:
The instance of the ResponseBuilder
- Type
- ResponseBuilder
withResponseId(responseId) → {ResponseBuilder}
Sets the id of the response
Parameters:
Name | Type | Description |
---|---|---|
responseId |
String | The id of the response |
- Source:
Returns:
The instance of the ResponseBuilder
- Type
- ResponseBuilder
withString(string) → {ResponseBuilder}
The passed in String will converted to JSON and merged with a response definition
Parameters:
Name | Type | Description |
---|---|---|
string |
String | String that when converted to JSON matches the parts of a response definition that is to be set |
- Source:
Returns:
The instance of the ResponseBuilder
- Type
- ResponseBuilder