Class NotificationModelToIdentifierSerializer
java.lang.Object
org.mule.runtime.extension.internal.persistence.NotificationModelToIdentifierSerializer
JSON Serializer for
NotificationModel instances as notification identifiers.- Since:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.mule.runtime.api.meta.model.notification.NotificationModeldeserialize(String notificationIdentifier) Deserializes a notification model identifier into anNotificationModel.static org.mule.runtime.api.meta.model.notification.NotificationModeldeserialize(String notificationIdentifier, Map<String, org.mule.runtime.api.meta.model.notification.NotificationModel> notificationModelRepository) Deserializes a notification model identifier into aNotificationModel.static Stringserialize(org.mule.runtime.api.meta.model.notification.NotificationModel notificationModel) Serializes aNotificationModelto the following structure:nameSpace:notificationIdentifier
-
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 aNotificationModel. Uses a Notification Model Repository to be able to rebuild the entire notification model.- Parameters:
notificationIdentifier- Notification following the following structurenameSpace:notificationIdentifiernotificationModelRepository- Repository of already builtnotification models- Returns:
- A
NotificationModelrepresenting the given notificationIdentifier
-
deserialize
public static org.mule.runtime.api.meta.model.notification.NotificationModel deserialize(String notificationIdentifier) Deserializes a notification model identifier into anNotificationModel.- Parameters:
notificationIdentifier- Notification following the following structurenameSpace:notificationIdentifier- Returns:
- A
NotificationModelrepresenting the given notificationIdentifier
-
serialize
public static String serialize(org.mule.runtime.api.meta.model.notification.NotificationModel notificationModel) Serializes aNotificationModelto the following structure:nameSpace:notificationIdentifier- Parameters:
notificationModel- Notification to serialize- Returns:
- Serialized notification
-