Annotation Type SerializedPersonalData


  • @Retention(RUNTIME)
    @Target({ANNOTATION_TYPE,FIELD})
    public @interface SerializedPersonalData
    Field annotation that marks the field as containing personal data. This triggers the Axon Data Protection Module to encrypt this fields when it processes an instance of the class declaring the field. The annotation can also be used as a meta-annotation on some other application-specific annotation.

    For use in Scala programs, there is a serializedPersonalData type alias for this annotation, defined in the package object of the api package. This alias has the scala.annotation.meta.field meta-annotation which allows it to be directly used on Scala class parameters, including case classes.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String group
      Get the name of the group of personal data fields that this field belong to.
      String replacement
      Defines a string to be used by the ReplacementValueProvider to determine the behaviour in case the decryption key is unavailable.
      String storageField
      Defines which field will be used to store the encrypted data in.
    • Element Detail

      • group

        String group
        Get the name of the group of personal data fields that this field belong to. This is useful if multiple keys are used on a single class. The group links the field to a particular key, since the DataSubjectId annotation has this same field.

        Optional. If left empty this defaults to the default group, identified by the empty string.

        Returns:
        the group
        Default:
        ""
      • storageField

        String storageField
        Defines which field will be used to store the encrypted data in.

        Optional. If left empty this default to the empty string, which will cause the Axon Data Protection Module to look for a field with the same name as the primary field, suffixed by "Encrypted".

        Returns:
        the storage field
        Default:
        ""
      • replacement

        String replacement
        Defines a string to be used by the ReplacementValueProvider to determine the behaviour in case the decryption key is unavailable. By default, the value of this attributed will be ignored for SerializedPersonalData.
        Returns:
        the replacement
        Default:
        ""