Index

A B C D E F G H I J L N O P R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values

A

ACL - Static variable in class net.pincette.jes.JsonFields
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.
ACL_GET - Static variable in class net.pincette.jes.JsonFields
The get field of an ACL, which represents the get command.
ACL_WRITE - Static variable in class net.pincette.jes.JsonFields
The write field of an ACL.
added(JsonObject, String) - Static method in class net.pincette.jes.Event
Returns true if the field at jsonPointer was added.
AFTER - Static variable in class net.pincette.jes.JsonFields
The aggregate after the reduction phase.
Aggregate<T,U> - Class in net.pincette.jes
This class manages the state of JSON aggregates.
Aggregate() - Constructor for class net.pincette.jes.Aggregate
This will install a standard reducer for the commands delete, patch and put.
app() - Method in class net.pincette.jes.Aggregate
Returns the app name.
applyEvent(JsonObject, JsonObject) - Static method in class net.pincette.jes.Event
Applies an event to an aggregate instance, which results in the next version of the aggregate.

B

BEFORE - Static variable in class net.pincette.jes.JsonFields
The aggregate before the reduction phase.
build() - Method in class net.pincette.jes.Aggregate
This builds the Streams topology for the aggregate.

C

changed(JsonObject, String) - Static method in class net.pincette.jes.Event
Returns true if the field at jsonPointer has changed.
changed(JsonObject, String, JsonValue, JsonValue) - Static method in class net.pincette.jes.Event
Returns true if the field at jsonPointer has changed from the value in from to the value in to.
Command - Class in net.pincette.jes
Some command utilities.
COMMAND - Static variable in class net.pincette.jes.JsonFields
The command name.
Commands - Class in net.pincette.jes
Built-in command names.
compose(Reducer, Reducer) - Static method in class net.pincette.jes.Util
Returns a reducer that first calls validator and if the result doesn't contain any errors it calls reducer.
CORR - Static variable in class net.pincette.jes.JsonFields
The correlation ID of a request.
createCommand(String, String, String) - Static method in class net.pincette.jes.Command
Creates a command without data.
createCommandBuilder(String, String, String) - Static method in class net.pincette.jes.Command
Creates a command builder without data.
createCommandBuilderFor(JsonObject, String) - Static method in class net.pincette.jes.Command
Creates a command builder which takes over the fields _type, _id and _jwt from json.
createCommandFor(JsonObject, String) - Static method in class net.pincette.jes.Command
Creates a command which takes over the fields _type, _id and _jwt from json.

D

delete(JsonObject) - Static method in class net.pincette.jes.Aggregate
The standard delete reducer.
DELETE - Static variable in class net.pincette.jes.Commands
Logical delete of an aggregate instance.
DELETED - Static variable in class net.pincette.jes.JsonFields
Indicates if an aggregate has been deleted.

E

environment() - Method in class net.pincette.jes.Aggregate
Returns the environment.
ERROR - Static variable in class net.pincette.jes.JsonFields
This boolean field indicates validation errors in commands.
ERRORS - Static variable in class net.pincette.jes.JsonFields
When a command has validation errors an array with this name is added to it.
Event - Class in net.pincette.jes
Utilities to work with events.

F

fullType() - Method in class net.pincette.jes.Aggregate
Returns the full aggregate type, which is composed as <app>-<type>.

G

GET - Static variable in class net.pincette.jes.Commands
Gets an aggregate.
getUsername(JsonObject) - Static method in class net.pincette.jes.Util
Returns the username from "/_jwt/sub".

H

hasError(JsonObject) - Static method in class net.pincette.jes.Command
Checks if json is marked with an error, which means the field _error is set to true.

I

ID - Static variable in class net.pincette.jes.JsonFields
The UUID of an aggregate instance.
isAllowed(JsonObject, JsonObject, boolean) - Static method in class net.pincette.jes.Command
Checks whether or not the given command is allowed for the given aggregate, based on the _acl field in the aggregate.
isCommand(JsonObject) - Static method in class net.pincette.jes.Command
Checks if json is a command.
isCommand(JsonObject, String) - Static method in class net.pincette.jes.Command
Checks if the command has the name.
isEvent(JsonObject) - Static method in class net.pincette.jes.Event
Checks if event has the proper event structure.
isJesObject(JsonObject) - Static method in class net.pincette.jes.Util
Checks if json is a JSON Event Sourcing object.
isManagedObject(JsonObject) - Static method in class net.pincette.jes.Util
Checks if json is a managed object.
isManagedObject(JsonObject, String, String) - Static method in class net.pincette.jes.Util
Checks if json is a managed object with the fields _id and _type set to id and type respectively.
isNext(JsonObject, JsonObject) - Static method in class net.pincette.jes.Event
Checks if the event has the next sequence number for the aggregate.

J

JsonFields - Class in net.pincette.jes
Standard fields for aggregates, events and commands.
JWT - Static variable in class net.pincette.jes.JsonFields
The payload of the JSON Web Token that was presented by the user in the REST API call.
JWT_BREAKING_THE_GLASS - Static variable in class net.pincette.jes.JsonFields
The breakingTheGlass field in the JWT payload.

L

LANGUAGES - Static variable in class net.pincette.jes.JsonFields
An array of language tags in the order of preference, which can be set on a command.
LOCK - Static variable in class net.pincette.jes.JsonFields
The lock object, which contains the sub and time fields.

N

net.pincette.jes - module net.pincette.jes
 
net.pincette.jes - package net.pincette.jes
 

O

OPS - Static variable in class net.pincette.jes.JsonFields
An array of operations as described in RFC 6902.

P

patch(JsonObject, JsonObject) - Static method in class net.pincette.jes.Aggregate
The standard patch reducer.
PATCH - Static variable in class net.pincette.jes.Commands
Applies a JSON patch.
put(JsonObject) - Static method in class net.pincette.jes.Aggregate
The standard put reducer.
PUT - Static variable in class net.pincette.jes.Commands
Replaces the state of an aggregate instance.

R

reconstruct(Stream<? extends JsonValue>) - Static method in class net.pincette.jes.Util
Reconstructs aggregate instances using a sequence of events.
reconstruct(JsonArray) - Static method in class net.pincette.jes.Util
Reconstructs aggregate instances using a sequence of events.
reconstruct(JsonParser) - Static method in class net.pincette.jes.Util
Reconstructs aggregate instances using a sequence of events.
reducer(BinaryOperator<JsonObject>) - Static method in class net.pincette.jes.Aggregate
Wraps a generic transformer in a Reducer.
reducer(UnaryOperator<JsonObject>...) - Static method in class net.pincette.jes.Aggregate
Wraps a sequence of generic transformers in a Reducer.
Reducer - Interface in net.pincette.jes
The first argument is the command.
removed(JsonObject, String) - Static method in class net.pincette.jes.Event
Returns true if the field at jsonPointer was removed.
removeTechnical(JsonObject) - Static method in class net.pincette.jes.Util
Removes all the technical fields JES uses.
ROLES - Static variable in class net.pincette.jes.JsonFields
The array of strings that can appear in the JWT payload.

S

SEQ - Static variable in class net.pincette.jes.JsonFields
The sequence number of an event.
sequenceErrorMessage(JsonObject, JsonObject) - Static method in class net.pincette.jes.Event
Creates a standard message to alert event sequence errors.
STATE - Static variable in class net.pincette.jes.JsonFields
This is the field that is added to a command when reducing it.
STATUS_CODE - Static variable in class net.pincette.jes.JsonFields
An HTTP status code that may be set on rejected commands
SUB - Static variable in class net.pincette.jes.JsonFields
The sub field, which appears in the JWT payload, the lock object and the subscription objects.
SUBSCRIPTIONS - Static variable in class net.pincette.jes.JsonFields
The array of subscription objects, which contain the sub and time fields.

T

TEST - Static variable in class net.pincette.jes.JsonFields
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.
TIMESTAMP - Static variable in class net.pincette.jes.JsonFields
A timestamp marker for commands an events
topic(String) - Method in class net.pincette.jes.Aggregate
Returns the topic name in the form <application>-<type>-purpose-< environment>.
type() - Method in class net.pincette.jes.Aggregate
Returns the aggregate type.
TYPE - Static variable in class net.pincette.jes.JsonFields
The aggregate type, which must be unique within a cluster

U

Util - Class in net.pincette.jes
Some general utilities.

W

withApp(String) - Method in class net.pincette.jes.Aggregate
Sets the name of the application.
withBackpressureTimeout(Duration) - Method in class net.pincette.jes.Aggregate
 
withBreakingTheGlass() - Method in class net.pincette.jes.Aggregate
Honors the JWT field breakingTheGlass when checking ACLs.
withBuilder(Streams<String, JsonObject, T, U>) - Method in class net.pincette.jes.Aggregate
Sets the Streams builder that will be used to create the topology.
withCommandProcessor(String, Flow.Processor<Message<String, JsonObject>, Message<String, JsonObject>>) - Method in class net.pincette.jes.Aggregate
Inserts a processor between the command topic and a specific reducer.
withCommandProcessor(Flow.Processor<Message<String, JsonObject>, Message<String, JsonObject>>) - Method in class net.pincette.jes.Aggregate
Inserts a processor between the command topic and the reducers.
withEnvironment(String) - Method in class net.pincette.jes.Aggregate
Sets the environment in which this aggregate will live.
withLogger(Logger) - Method in class net.pincette.jes.Aggregate
Sets the logger, which will be used when the log level is FINEST.
withMongoClient(MongoClient) - Method in class net.pincette.jes.Aggregate
Sets the MongoDB client that is needed to create a session.
withMongoDatabase(MongoDatabase) - Method in class net.pincette.jes.Aggregate
The MongoDB database in which the events and aggregates are written.
withReducer(String, Flow.Processor<Message<String, JsonObject>, Message<String, JsonObject>>) - Method in class net.pincette.jes.Aggregate
Sets the reducer for the given command.
withReducer(String, Reducer) - Method in class net.pincette.jes.Aggregate
Sets the reducer for the given command.
withReducer(Reducer) - Method in class net.pincette.jes.Aggregate
Sets the reducer for all commands, which means the reducer does the dispatching itself.
withType(String) - Method in class net.pincette.jes.Aggregate
Sets the aggregate type, which will become the suffix for the full aggregate type.
withUniqueExpression(JsonValue) - Method in class net.pincette.jes.Aggregate
When the expression is given it is used on commands to obtain an alternate unique key.
A B C D E F G H I J L N O P R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values