Class LanguageCheckFilter

java.lang.Object
org.qubitpi.wilhelm.web.filters.LanguageCheckFilter
All Implemented Interfaces:
jakarta.ws.rs.container.ContainerRequestFilter

@Immutable @ThreadSafe @Provider public class LanguageCheckFilter extends Object implements jakarta.ws.rs.container.ContainerRequestFilter
A ContainerRequestFilter that validates the language path param in endpoint requests and only applies to those with "languages/{language}" in the middle of its endpoint path, for example "/languages/{language}/count".

Endpoints wishing to be validated by this filter must satisfy 2 requirements:

  1. having a "language" @PathParam
  2. the resource/endpoint method has been annotated with LanguageCheck
  • Constructor Details

    • LanguageCheckFilter

      public LanguageCheckFilter()
  • Method Details

    • filter

      public void filter(jakarta.ws.rs.container.ContainerRequestContext containerRequestContext)
      Specified by:
      filter in interface jakarta.ws.rs.container.ContainerRequestFilter