Package org.qubitpi.wilhelm.web.filters
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:
- having a
"language" @PathParam
- the resource/endpoint method has been annotated with
LanguageCheck
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
filter
(jakarta.ws.rs.container.ContainerRequestContext containerRequestContext)
-
Constructor Details
-
LanguageCheckFilter
public LanguageCheckFilter()
-
-
Method Details
-
filter
public void filter(jakarta.ws.rs.container.ContainerRequestContext containerRequestContext) - Specified by:
filter
in interfacejakarta.ws.rs.container.ContainerRequestFilter
-