Class ConsentDataUpdateRequest

  • Direct Known Subclasses:
    ConsentDataModificationRequest

    public class ConsentDataUpdateRequest
    extends Object
    Represents a request to update consent data. This class allows the modification of consent metadata, update flag, and update timestamp. It includes validation to ensure that at least one consent metadata item is provided.
    Author:
    nikritikos
    • Constructor Detail

      • ConsentDataUpdateRequest

        public ConsentDataUpdateRequest()
    • Method Detail

      • getMetadata

        public List<ConsentMetadata> getMetadata()
        Gets the metadata items related to the consent.
        Returns:
        The metadata list.
      • addMetadata

        public void addMetadata​(String key,
                                String value)
        Adds a new metadata item to the consent request.
        Parameters:
        key - The key of the metadata.
        value - The value associated with the key.
      • getFlag

        public UpdateField<Boolean> getFlag()
        Gets the flag indicating whether the consent has been granted or requires an update.
        Returns:
        The flag.
      • setFlag

        public void setFlag​(UpdateField<Boolean> flag)
        Sets the flag indicating the status of consent.
        Parameters:
        flag - The flag value.
      • getUpdateDate

        public UpdateField<Date> getUpdateDate()
        Gets the date when the consent data was last updated.
        Returns:
        The update date.
      • setUpdateDate

        public void setUpdateDate​(UpdateField<Date> updateDate)
        Sets the date when the consent data was last updated.
        Parameters:
        updateDate - The update date value.
      • toString

        public String toString()
        Custom toString method to log the details of the consent update request.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the object.