private static HttpResponseRenderer mediaResponseRenderer(Resp resp) { Customization customization = Customization.of(resp.request()); if (resp.contentType().equals(MediaType.JSON)) { return customization.jsonResponseRenderer(); } else if (resp.contentType().equals(MediaType.XML_UTF_8)) { return customization.xmlResponseRenderer(); } else { // defaults to json return customization.jsonResponseRenderer(); } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RouteOptions that = (RouteOptions) o; if (mvc != that.mvc) return false; if (managed != that.managed) return false; if (cacheTTL != that.cacheTTL) return false; if (cacheCapacity != that.cacheCapacity) return false; if (contentType != null ? !contentType.equals(that.contentType) : that.contentType != null) return false; if (view != null ? !view.equals(that.view) : that.view != null) return false; if (zone != null ? !zone.equals(that.zone) : that.zone != null) return false; if (transaction != that.transaction) return false; if (roles != null ? !roles.equals(that.roles) : that.roles != null) return false; return Arrays.equals(wrappers, that.wrappers); }
private static HttpResponseRenderer mediaResponseRenderer(Resp resp) { Customization customization = Customization.of(resp.request()); if (resp.contentType().equals(MediaType.JSON)) { return customization.jsonResponseRenderer(); } else if (resp.contentType().equals(MediaType.XML_UTF_8)) { return customization.xmlResponseRenderer(); } else { // defaults to json return customization.jsonResponseRenderer(); } }