Class MCRContentNegotiationViaExtensionFilter

java.lang.Object
org.mycore.restapi.MCRContentNegotiationViaExtensionFilter
All Implemented Interfaces:
jakarta.ws.rs.container.ContainerRequestFilter

@Provider @PreMatching @Priority(2990) public class MCRContentNegotiationViaExtensionFilter extends Object implements jakarta.ws.rs.container.ContainerRequestFilter
This filter uses Jersey's default implementation of UriConnectFilter to set the content headers by file extension. It is preconfigured for the extensions (*.json, *.xml) and ignores ressources behind REST-API path /contents/ since there is the possibility that a valid file extension (*.xml) will be removed through this filter by mistake
Author:
Robert Stephan
  • Constructor Details

    • MCRContentNegotiationViaExtensionFilter

      public MCRContentNegotiationViaExtensionFilter()
  • Method Details

    • filter

      public void filter(jakarta.ws.rs.container.ContainerRequestContext requestContext) throws IOException
      Specified by:
      filter in interface jakarta.ws.rs.container.ContainerRequestFilter
      Throws:
      IOException