use of com.github.sebastianfrey.joa.services.OGCAPIService in project joa by sebastianfrey.
the class JoaFeature method configure.
@Override
public boolean configure(FeatureContext context) {
// setup linking
context.register(DeclarativeLinkingFeature.class);
// include body for 4xx and 5xx
context.property(ServerProperties.RESPONSE_SET_STATUS_OVER_SEND_ERROR, true);
// return 400 for QueryParamExceptions
context.register(QueryParamExceptionHandler.class);
// rewrite format query param as accept header
context.register(RewriteFormatQueryParamToAcceptHeaderRequestFilter.class);
// transform linkable entities
context.register(AlternateLinksResponseFilter.class);
// context access for Freemarker templates
context.register(ContextAwareViewResponseFilter.class);
// setup dependency injection for CollectionService
context.register(new AbstractBinder() {
@Override
protected void configure() {
bind(ogcApiService).to(OGCAPIService.class);
}
});
// set up resources
context.register(OGCAPIServiceResource.class);
return true;
}
Aggregations