Class AlfrescoApiResponseInterceptor

  • All Implemented Interfaces:
    org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>

    @ControllerAdvice
    public class AlfrescoApiResponseInterceptor
    extends Object
    implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
    class used to process the response with alfresco rest API behavior only if the anootaion AlfrescoRestResponse is used
    • Constructor Summary

      Constructors 
      Constructor Description
      AlfrescoApiResponseInterceptor​(org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper webscriptHelper)  
      AlfrescoApiResponseInterceptor​(org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper webscriptHelper, boolean globalAlfrescoResponse)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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)  
      static org.alfresco.rest.framework.resource.parameters.Params getDefaultParameters​(org.springframework.extensions.webscripts.WebScriptRequest wsr)  
      boolean supports​(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)  
    • Constructor Detail

      • AlfrescoApiResponseInterceptor

        public AlfrescoApiResponseInterceptor​(org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper webscriptHelper)
      • AlfrescoApiResponseInterceptor

        public AlfrescoApiResponseInterceptor​(org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper webscriptHelper,
                                              boolean globalAlfrescoResponse)
    • Method Detail

      • 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:
        beforeBodyWrite in interface org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
      • supports

        public boolean supports​(org.springframework.core.MethodParameter returnType,
                                Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
        Specified by:
        supports in interface org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
      • getDefaultParameters

        public static org.alfresco.rest.framework.resource.parameters.Params getDefaultParameters​(org.springframework.extensions.webscripts.WebScriptRequest wsr)