Class ErrorModelToIdentifierSerializer
java.lang.Object
org.mule.runtime.extension.internal.persistence.ErrorModelToIdentifierSerializer
JSON Serializer for
ErrorModel instances as error identifiers.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.mule.runtime.api.meta.model.error.ErrorModeldeserialize(String errorIdentifier) Deserializes an error model identifier into anErrorModel.static org.mule.runtime.api.meta.model.error.ErrorModeldeserialize(String errorIdentifier, Map<String, org.mule.runtime.api.meta.model.error.ErrorModel> errorModelRepository) Deserializes an error model identifier into anErrorModel.static Stringserialize(org.mule.runtime.api.meta.model.error.ErrorModel errorModel) Serializes anErrorModelto the following structure:nameSpace:errorType
-
Constructor Details
-
ErrorModelToIdentifierSerializer
public ErrorModelToIdentifierSerializer()
-
-
Method Details
-
deserialize
public static org.mule.runtime.api.meta.model.error.ErrorModel deserialize(String errorIdentifier, Map<String, org.mule.runtime.api.meta.model.error.ErrorModel> errorModelRepository) Deserializes an error model identifier into anErrorModel. Uses an Error Model Repository to be able to rebuild the entire error model hierarchy, if it exist.- Parameters:
errorIdentifier- Error following the following structurenameSpace:errorType, example:MULE:CONNECTIVITYerrorModelRepository- Repository of already builterror models- Returns:
- An
ErrorModelrepresenting the given errorIdentifier
-
deserialize
Deserializes an error model identifier into anErrorModel.- Parameters:
errorIdentifier- Error following the following structurenameSpace:errorType, example:MULE:CONNECTIVITY- Returns:
- An
ErrorModelrepresenting the given errorIdentifier
-
serialize
Serializes anErrorModelto the following structure:nameSpace:errorType- Parameters:
errorModel- Error to serialize- Returns:
- Serialized error
-