Class FieldFilter
java.lang.Object
com.erudika.para.server.utils.filters.FieldFilter
- All Implemented Interfaces:
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
@ControllerAdvice
@Order(100)
public class FieldFilter
extends Object
implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
Filter response entities dynamically, based on a list of selected fields. Returns partial objects.
- Author:
- Alex Bogdanovski [[email protected]]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response) booleansupports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
determineWriteHints
-
Constructor Details
-
FieldFilter
public FieldFilter()
-
-
Method Details
-
supports
public boolean supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) - Specified by:
supportsin interfaceorg.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
-
beforeBodyWrite
public Object beforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response) - Specified by:
beforeBodyWritein interfaceorg.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
-