Klasse ConsentNotificationMessage

java.lang.Object
org.emau.icmvc.ttp.notification.NotificationMessage
org.emau.icmvc.ganimed.ttp.cm2.util.ConsentNotificationMessage

public class ConsentNotificationMessage extends org.emau.icmvc.ttp.notification.NotificationMessage
A class to encapsulate a ConsentKeyDTO,a map with PolicyKeyDTO as keys and their consent status as values as well as some metadata as a notification message which can be serialized to and deserialized from a JSON representation.
  • Konstruktordetails

    • ConsentNotificationMessage

      public ConsentNotificationMessage()
      Creates an empty notification message (needed by deserialization).
    • ConsentNotificationMessage

      public ConsentNotificationMessage(String json) throws IOException
      Creates a notification message directly from its JSON represention.
      Löst aus:
      IOException
    • ConsentNotificationMessage

      public ConsentNotificationMessage(ConsentKeyDTO consentKey, String type, String clientId, String comment)
      Creates a notification message for the given values.
      Parameter:
      consentKey - the consent key
      type - the message type
      clientId - the client ID
      comment - a comment
    • ConsentNotificationMessage

      public ConsentNotificationMessage(ConsentKeyDTO consentKey, Map<PolicyKeyDTO,Boolean> previousPolicyStates, String type, String clientId, String comment)
      Creates a notification message for the given values.
      Parameter:
      consentKey - the consent key
      previousPolicyStates - a map with the previous policy status for referred consent
      type - the message type
      clientId - the client ID
      comment - a comment
    • ConsentNotificationMessage

      public ConsentNotificationMessage(ConsentKeyDTO consentKey, Map<PolicyKeyDTO,Boolean> previousPolicyStates, Map<PolicyKeyDTO,Boolean> currentPolicyStates, String type, String clientId, String comment, Map<String,Serializable> context)
      Creates a notification message for the given values.
      Parameter:
      consentKey - the consent key
      previousPolicyStates - a map with the previous policy status for referred consent
      currentPolicyStates - a map with the current policy status for referred consent
      type - the message type
      clientId - the client ID
      comment - a comment
  • Methodendetails

    • capture

      public void capture(org.emau.icmvc.ttp.notification.NotificationMessage msg)
      Captures the content from the given message into this message.
      Setzt außer Kraft:
      capture in Klasse org.emau.icmvc.ttp.notification.NotificationMessage
      Parameter:
      msg - the message to capture
    • getConsentKey

      public ConsentKeyDTO getConsentKey()
    • setConsentKey

      public void setConsentKey(ConsentKeyDTO consentKey)
    • getPreviousPolicyStates

      public Map<PolicyKeyDTO,Boolean> getPreviousPolicyStates()
    • setPreviousPolicyStates

      public void setPreviousPolicyStates(Map<PolicyKeyDTO,Boolean> previousPolicyStates)
    • getCurrentPolicyStates

      public Map<PolicyKeyDTO,Boolean> getCurrentPolicyStates()
    • setCurrentPolicyStates

      public void setCurrentPolicyStates(Map<PolicyKeyDTO,Boolean> currentPolicyStates)
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse org.emau.icmvc.ttp.notification.NotificationMessage
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse org.emau.icmvc.ttp.notification.NotificationMessage
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object