use of com.google.gerrit.extensions.restapi.RestApiModule in project gerrit by GerritCodeReview.
the class TestPluginModule method configure.
@Override
protected void configure() {
bind(CapabilityDefinition.class).annotatedWith(Exports.named(PLUGIN_CAPABILITY)).toInstance(new CapabilityDefinition() {
@Override
public String getDescription() {
return "Print Hello";
}
});
install(new RestApiModule() {
@Override
protected void configure() {
DynamicMap.mapOf(binder(), PLUGIN_KIND);
child(CONFIG_KIND, PLUGIN_COLLECTION).to(PluginCollection.class);
get(PLUGIN_KIND).to(GetTestPlugin.class);
create(PLUGIN_KIND).to(CreateTestPlugin.class);
}
});
}
Aggregations