Interface ResourceAttributeSerializer<T>

All Known Implementing Classes:
FormSubmissionHandler.Serializer, KeyEvent.Serializer, KeystrokeKey.Serializer, MessageHandlerKey.Serializer, TagChangeScript.Serializer, TimerKey.Serializer

public interface ResourceAttributeSerializer<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    Decodes the given object from the provided Resource by extracting its attribute fields.
    Encodes the given object into resource attribute fields.
  • Method Details

    • encodeToResource

      Consumer<ResourceBuilder> encodeToResource(T object)
      Encodes the given object into resource attribute fields.
      Parameters:
      object - the object to encode
      Returns:
      a Consumer that modifies the ResourceBuilder by setting the relevant attributes of the given object
    • decodeFromResource

      T decodeFromResource(Resource resource)
      Decodes the given object from the provided Resource by extracting its attribute fields.
      Parameters:
      resource - the resource object from which the object should be decoded
      Returns:
      the decoded object