java.lang.Object
org.mule.runtime.extension.internal.persistence.ErrorModelToIdentifierSerializer

public class ErrorModelToIdentifierSerializer extends Object
JSON Serializer for ErrorModel instances as error identifiers.
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.mule.runtime.api.meta.model.error.ErrorModel
    deserialize(String errorIdentifier)
    Deserializes an error model identifier into an ErrorModel.
    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 an ErrorModel.
    static String
    serialize(org.mule.runtime.api.meta.model.error.ErrorModel errorModel)
    Serializes an ErrorModel to the following structure: nameSpace:errorType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 an ErrorModel. Uses an Error Model Repository to be able to rebuild the entire error model hierarchy, if it exist.
      Parameters:
      errorIdentifier - Error following the following structure nameSpace:errorType, example: MULE:CONNECTIVITY
      errorModelRepository - Repository of already built error models
      Returns:
      An ErrorModel representing the given errorIdentifier
    • deserialize

      public static org.mule.runtime.api.meta.model.error.ErrorModel deserialize(String errorIdentifier)
      Deserializes an error model identifier into an ErrorModel.
      Parameters:
      errorIdentifier - Error following the following structure nameSpace:errorType, example: MULE:CONNECTIVITY
      Returns:
      An ErrorModel representing the given errorIdentifier
    • serialize

      public static String serialize(org.mule.runtime.api.meta.model.error.ErrorModel errorModel)
      Serializes an ErrorModel to the following structure: nameSpace:errorType
      Parameters:
      errorModel - Error to serialize
      Returns:
      Serialized error