T
- Class of the result we expectpublic abstract class DbRequestParameters<T>
extends java.lang.Object
Parameter object that is used to hand over all Elements that are needed to execute operations synchronously against a database for a given user
Modifier and Type | Field and Description |
---|---|
com.hcl.domino.DominoClient |
client
Access to commonly used Domino functions including DXL, databases and time ranges
|
com.hcl.domino.data.Database |
db
Notes database (nsf, ntf) containing the data to be acted upon Can be the database behind an alias, the mail file or the secondary calendar
|
KeepFactory |
factory
Shortcut access to the KeepFactory for DB related info current KeepFactory
|
io.vertx.core.json.JsonObject |
incoming
Incoming request containing parameters and eventually a body
|
io.reactivex.Observer<T> |
observer
Returns the observer for the values Observer
|
KeepJnxSession |
session
Keep Session that contains User and server info Starting point of entire action chain valid Keep Session
|
protected java.util.function.Predicate<io.vertx.core.json.JsonObject> |
validator |
Modifier | Constructor and Description |
---|---|
protected |
DbRequestParameters(KeepFactory factory,
KeepJnxSession session,
com.hcl.domino.DominoClient client,
com.hcl.domino.data.Database db,
io.reactivex.Observer<T> observer,
io.vertx.core.json.JsonObject incoming) |
Modifier and Type | Method and Description |
---|---|
abstract T |
emit(T result)
emit() is used to return results from the database operation It can be called zero to N times.
|
abstract void |
validate()
Default call to ensure valid requests
|
java.util.function.Predicate<io.vertx.core.json.JsonObject> |
validator()
Validation function for parameters.
|
DbRequestParameters<T> |
validator(java.util.function.Predicate<io.vertx.core.json.JsonObject> newValidator)
Allows to overwrite the existing validator
|
protected java.util.function.Predicate<io.vertx.core.json.JsonObject> validator
public final com.hcl.domino.data.Database db
Notes database (nsf, ntf) containing the data to be acted upon Can be the database behind an alias, the mail file or the secondary calendar
public final KeepFactory factory
Shortcut access to the KeepFactory for DB related info current KeepFactory
public final io.vertx.core.json.JsonObject incoming
Incoming request containing parameters and eventually a body
public final io.reactivex.Observer<T> observer
Returns the observer for the values Observer
public final KeepJnxSession session
Keep Session that contains User and server info Starting point of entire action chain valid Keep Session
public final com.hcl.domino.DominoClient client
Access to commonly used Domino functions including DXL, databases and time ranges
protected DbRequestParameters(KeepFactory factory, KeepJnxSession session, com.hcl.domino.DominoClient client, com.hcl.domino.data.Database db, io.reactivex.Observer<T> observer, io.vertx.core.json.JsonObject incoming)
factory
- session
- client
- db
- observer
- incoming
- public abstract T emit(@Nonnull T result)
emit() is used to return results from the database operation It can be called zero to N times.
result
- Outcome of the database operationpublic abstract void validate() throws KeepException
Default call to ensure valid requests
KeepException
public java.util.function.Predicate<io.vertx.core.json.JsonObject> validator()
Validation function for parameters. Injected in main processing
public DbRequestParameters<T> validator(java.util.function.Predicate<io.vertx.core.json.JsonObject> newValidator)
Allows to overwrite the existing validator
newValidator
- a predicate to check validity