java.lang.Object
net.pincette.jes.JsonFields
Standard fields for aggregates, events and commands.
- Since:
- 3.0
- Author:
- Werner Donné
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe access control list field, which refers to an object with areadand awritefield, both of which are arrays with principal names.static final StringThegetfield of an ACL, which represents thegetcommand.static final StringThewritefield of an ACL.static final StringThe aggregate after the reduction phase.static final StringThe aggregate before the reduction phase.static final StringThe command name.static final StringThe correlation ID of a request.static final StringIndicates if an aggregate has been deleted.static final StringThis boolean field indicates validation errors in commands.static final StringWhen a command has validation errors an array with this name is added to it.static final StringThe UUID of an aggregate instance.static final StringThe payload of the JSON Web Token that was presented by the user in the REST API call.static final StringThebreakingTheGlassfield in the JWT payload.static final StringAn array of language tags in the order of preference, which can be set on a command.static final StringThe lock object, which contains thesubandtimefields.static final StringAn array of operations as described in RFC 6902.static final StringThe array of strings that can appear in the JWT payload.static final StringThe sequence number of an event.static final StringThis is the field that is added to a command when reducing it.static final StringAn HTTP status code that may be set on rejected commandsstatic final StringThesubfield, which appears in the JWT payload, the lock object and the subscription objects.static final StringThe array of subscription objects, which contain thesubandtimefields.static final StringThis 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 StringA timestamp marker for commands an eventsstatic final StringThe aggregate type, which must be unique within a cluster -
Method Summary
-
Field Details
-
ACL
The access control list field, which refers to an object with areadand awritefield, both of which are arrays with principal names.- See Also:
-
ACL_GET
Thegetfield of an ACL, which represents thegetcommand.- See Also:
-
ACL_WRITE
Thewritefield of an ACL. This field is used as a fallback for commands that aren't mentioned in the ACL.- See Also:
-
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
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
The command name.- See Also:
-
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
Indicates if an aggregate has been deleted. Aggregates are not physically destroyed.- See Also:
-
ERROR
This boolean field indicates validation errors in commands. Commands with such errors are sent back to the client.- See Also:
-
ERRORS
When a command has validation errors an array with this name is added to it. The objects in the array contain the fieldspath, which is a JSON pointer, andcode, which is a technical code about the validation error. Clients can use this to display an error message.- See Also:
-
ID
The UUID of an aggregate instance.- See Also:
-
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
ThebreakingTheGlassfield in the JWT payload. This overrules ACL checking.- See Also:
-
LOCK
The lock object, which contains thesubandtimefields. The time * is in milliseconds.- See Also:
-
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
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
The array of strings that can appear in the JWT payload.- See Also:
-
SUB
Thesubfield, which appears in the JWT payload, the lock object and the subscription objects.- See Also:
-
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
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
An HTTP status code that may be set on rejected commands.*- See Also:
-
SUBSCRIPTIONS
The array of subscription objects, which contain thesubandtimefields.- See Also:
-
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
A timestamp marker for commands an events.*- See Also:
-
TYPE
The aggregate type, which must be unique within a cluster.*- See Also:
-