Class ErrorFactory
- java.lang.Object
-
- com.ellucian.ethos.integration.client.errors.ErrorFactory
-
public class ErrorFactory extends Object
A Factory class to help with building Error objects.- Since:
- 0.0.1
-
-
Constructor Summary
Constructors Constructor Description ErrorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EthosError
createErrorFromJson(String json)
Create an Error object using a JSON string.static List<EthosError>
createErrorListFromJson(String json)
Create an Error array using a JSON string.
-
-
-
Method Detail
-
createErrorFromJson
public static EthosError createErrorFromJson(String json) throws com.fasterxml.jackson.core.JsonProcessingException
Create an Error object using a JSON string. This will attempt to parse the given string into an Error object.- Parameters:
json
- the JSON string representing an error- Returns:
- an Error object created from the given JSON string.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- if the string cannot be parsed to create an Error
-
createErrorListFromJson
public static List<EthosError> createErrorListFromJson(String json) throws com.fasterxml.jackson.core.JsonProcessingException
Create an Error array using a JSON string. This will attempt to parse the given string into a list of Errors.- Parameters:
json
- the JSON string representing an array of errors.- Returns:
- a List of Errors created from the given JSON string.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Thrown if the string cannot be parsed to create a list of Errors.
-
-