-
Notifications
You must be signed in to change notification settings - Fork 0
1.0 Controller Implementation
Anders Mikkelsen edited this page Dec 9, 2017
·
4 revisions
A clean implementation expects two parameters, and accepts two optional parameters.
- The vertx app configuration
- For Redis backed etag storage, the configuration should have a parameter "redis_host", and an optional "redis_port".
- A Repository implementation that is typed to the class use for the RestControllerImpl inheritance
- An optional Function that reads the routingcontext and returns a valid idObject based on the path, this is implemented by the client implementation.
The method postVerifyNotExists method should be overriden to set ids from the path if necessary. E.g. with a DynamoDB implemenation.
public class TestModelRESTController extends RestControllerImpl<TestModel> {
public TestModelRESTController(Vertx vertx, JsonObject appConfig, Repository<TestModel> repository) {
super(vertx, TestModel.class, appConfig, repository, null);
}
}