Class JsonFields

java.lang.Object
net.pincette.jes.JsonFields

public class JsonFields extends Object
Standard fields for aggregates, events and commands.
Since:
3.0
Author:
Werner Donné
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The access control list field, which refers to an object with a read and a write field, both of which are arrays with principal names.
    static final String
    The get field of an ACL, which represents the get command.
    static final String
    The write field of an ACL.
    static final String
    The aggregate after the reduction phase.
    static final String
    The aggregate before the reduction phase.
    static final String
    The command name.
    static final String
    The correlation ID of a request.
    static final String
    Indicates if an aggregate has been deleted.
    static final String
    This boolean field indicates validation errors in commands.
    static final String
    When a command has validation errors an array with this name is added to it.
    static final String
    The UUID of an aggregate instance.
    static final String
    The payload of the JSON Web Token that was presented by the user in the REST API call.
    static final String
    The breakingTheGlass field in the JWT payload.
    static final String
    An array of language tags in the order of preference, which can be set on a command.
    static final String
    The lock object, which contains the sub and time fields.
    static final String
    An array of operations as described in RFC 6902.
    static final String
    The array of strings that can appear in the JWT payload.
    static final String
    The sequence number of an event.
    static final String
    This is the field that is added to a command when reducing it.
    static final String
    An HTTP status code that may be set on rejected commands
    static final String
    The sub field, which appears in the JWT payload, the lock object and the subscription objects.
    static final String
    The array of subscription objects, which contain the sub and time fields.
    static final String
    This boolean field sets the test mode, in which case responses of validation errors and aggregate updates go back to the HTTP response body instead of being sent asynchronously.
    static final String
    A timestamp marker for commands an events
    static final String
    The aggregate type, which must be unique within a cluster
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ACL

      public static final String ACL
      The access control list field, which refers to an object with a read and a write field, both of which are arrays with principal names.
      See Also:
    • ACL_GET

      public static final String ACL_GET
      The get field of an ACL, which represents the get command.
      See Also:
    • ACL_WRITE

      public static final String ACL_WRITE
      The write field of an ACL. This field is used as a fallback for commands that aren't mentioned in the ACL.
      See Also:
    • AFTER

      public static final String AFTER
      The aggregate after the reduction phase. It is present on published events, but it is stripped from the event when it is saved in the event log.
      See Also:
    • BEFORE

      public static final String BEFORE
      The aggregate before the reduction phase. It is present on published events, but it is stripped from the event when it is saved in the event log.
      See Also:
    • COMMAND

      public static final String COMMAND
      The command name.
      See Also:
    • CORR

      public static final String CORR
      The correlation ID of a request. It is propagated from commands to events and aggregates. This way the entire event flow can be followed. A correlation ID will be generated if the client hasn't set it in the submitted command.
      See Also:
    • DELETED

      public static final String DELETED
      Indicates if an aggregate has been deleted. Aggregates are not physically destroyed.
      See Also:
    • ERROR

      public static final String ERROR
      This boolean field indicates validation errors in commands. Commands with such errors are sent back to the client.
      See Also:
    • ERRORS

      public static final String ERRORS
      When a command has validation errors an array with this name is added to it. The objects in the array contain the fields path, which is a JSON pointer, and code, which is a technical code about the validation error. Clients can use this to display an error message.
      See Also:
    • ID

      public static final String ID
      The UUID of an aggregate instance.
      See Also:
    • JWT

      public static final String JWT
      The payload of the JSON Web Token that was presented by the user in the REST API call. It is set on submitted commands and propagates to events and aggregates.
      See Also:
    • JWT_BREAKING_THE_GLASS

      public static final String JWT_BREAKING_THE_GLASS
      The breakingTheGlass field in the JWT payload. This overrules ACL checking.
      See Also:
    • LOCK

      public static final String LOCK
      The lock object, which contains the sub and time fields. The time * is in milliseconds.
      See Also:
    • LANGUAGES

      public static final String LANGUAGES
      An array of language tags in the order of preference, which can be set on a command. When a validator or some other component wishes to send messages to the user, it can use the proper language for it.
      See Also:
    • OPS

      public static final String OPS
      An array of operations as described in RFC 6902. Events always have this field. It describes how an aggregate instance has changed after the reduction of a command.
      See Also:
    • ROLES

      public static final String ROLES
      The array of strings that can appear in the JWT payload.
      See Also:
    • SUB

      public static final String SUB
      The sub field, which appears in the JWT payload, the lock object and the subscription objects.
      See Also:
    • SEQ

      public static final String SEQ
      The sequence number of an event. When an aggregate instance is fetched it will contain the sequence number of the last event that was generated from it.
      See Also:
    • STATE

      public static final String STATE
      This is the field that is added to a command when reducing it. It represents the current state of the aggregate instance.
      See Also:
    • STATUS_CODE

      public static final String STATUS_CODE
      An HTTP status code that may be set on rejected commands.*
      See Also:
    • SUBSCRIPTIONS

      public static final String SUBSCRIPTIONS
      The array of subscription objects, which contain the sub and time fields.
      See Also:
    • TEST

      public static final String TEST
      This boolean field sets the test mode, in which case responses of validation errors and aggregate updates go back to the HTTP response body instead of being sent asynchronously.
      See Also:
    • TIMESTAMP

      public static final String TIMESTAMP
      A timestamp marker for commands an events.*
      See Also:
    • TYPE

      public static final String TYPE
      The aggregate type, which must be unique within a cluster.*
      See Also: