Class NotificationModelToIdentifierSerializer

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

public class NotificationModelToIdentifierSerializer extends Object
JSON Serializer for NotificationModel instances as notification identifiers.
Since:
1.1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.mule.runtime.api.meta.model.notification.NotificationModel
    deserialize(String notificationIdentifier)
    Deserializes a notification model identifier into an NotificationModel.
    static org.mule.runtime.api.meta.model.notification.NotificationModel
    deserialize(String notificationIdentifier, Map<String,org.mule.runtime.api.meta.model.notification.NotificationModel> notificationModelRepository)
    Deserializes a notification model identifier into a NotificationModel.
    static String
    serialize(org.mule.runtime.api.meta.model.notification.NotificationModel notificationModel)
    Serializes a NotificationModel to the following structure: nameSpace:notificationIdentifier

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NotificationModelToIdentifierSerializer

      public NotificationModelToIdentifierSerializer()
  • Method Details

    • deserialize

      public static org.mule.runtime.api.meta.model.notification.NotificationModel deserialize(String notificationIdentifier, Map<String,org.mule.runtime.api.meta.model.notification.NotificationModel> notificationModelRepository)
      Deserializes a notification model identifier into a NotificationModel. Uses a Notification Model Repository to be able to rebuild the entire notification model.
      Parameters:
      notificationIdentifier - Notification following the following structure nameSpace:notificationIdentifier
      notificationModelRepository - Repository of already built notification models
      Returns:
      A NotificationModel representing the given notificationIdentifier
    • deserialize

      public static org.mule.runtime.api.meta.model.notification.NotificationModel deserialize(String notificationIdentifier)
      Deserializes a notification model identifier into an NotificationModel.
      Parameters:
      notificationIdentifier - Notification following the following structure nameSpace:notificationIdentifier
      Returns:
      A NotificationModel representing the given notificationIdentifier
    • serialize

      public static String serialize(org.mule.runtime.api.meta.model.notification.NotificationModel notificationModel)
      Serializes a NotificationModel to the following structure: nameSpace:notificationIdentifier
      Parameters:
      notificationModel - Notification to serialize
      Returns:
      Serialized notification