Class RestHookChannelValidator
java.lang.Object
ca.uhn.fhir.jpa.subscription.submit.interceptor.validator.RestHookChannelValidator
- All Implemented Interfaces:
IChannelTypeValidator
Definition of a REST Hook channel validator that perform checks on the channel payload and endpoint URL.
The channel payload will always evaluate in the same manner where endpoint URL validation can be extended beyond the
minimal validation perform by this class.
At a minimum, this class ensures that the provided URL is not blank or null. Supplemental validation(s) should be
encapsulated into a
RestHookChannelValidator.IEndpointUrlValidationStrategy
and provided with the arg constructor.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A concrete instantiation of this interface should provide tailored validation of an endpoint URL throwingRuntimeException
upon validation failure. -
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionConstructor for a validator where the endpoint URL willRestHookChannelValidator
(RestHookChannelValidator.IEndpointUrlValidationStrategy theEndpointUrlValidationStrategy) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
validateChannelEndpoint
(CanonicalSubscription theCanonicalSubscription) protected void
validateChannelPayload
(CanonicalSubscription theResource) void
validateChannelType
(CanonicalSubscription theSubscription)
-
Field Details
-
noOpEndpointUrlValidationStrategy
-
-
Constructor Details
-
RestHookChannelValidator
public RestHookChannelValidator()Constructor for a validator where the endpoint URL will -
RestHookChannelValidator
public RestHookChannelValidator(@Nonnull RestHookChannelValidator.IEndpointUrlValidationStrategy theEndpointUrlValidationStrategy)
-
-
Method Details
-
validateChannelType
- Specified by:
validateChannelType
in interfaceIChannelTypeValidator
-
getSubscriptionChannelType
- Specified by:
getSubscriptionChannelType
in interfaceIChannelTypeValidator
-
validateChannelEndpoint
-
validateChannelPayload
-