001package ca.uhn.fhir.validation; 002 003import org.hl7.fhir.instance.model.api.IBaseResource; 004 005 006/* 007 * #%L 008 * HAPI FHIR - Core Library 009 * %% 010 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 011 * %% 012 * Licensed under the Apache License, Version 2.0 (the "License"); 013 * you may not use this file except in compliance with the License. 014 * You may obtain a copy of the License at 015 * 016 * http://www.apache.org/licenses/LICENSE-2.0 017 * 018 * Unless required by applicable law or agreed to in writing, software 019 * distributed under the License is distributed on an "AS IS" BASIS, 020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 021 * See the License for the specific language governing permissions and 022 * limitations under the License. 023 * #L% 024 */ 025 026/** 027 * An individual validation module, which applies validation rules against 028 * resources and adds failure/informational messages as it goes. 029 * 030 * See <a href="https://hapifhir.io/hapi-fhir/docs/validation/introduction.html">Validation</a> 031 * for a list of available modules. You may also create your own. 032 */ 033public interface IValidatorModule { 034 035 /** 036 * Validate the actual resource. 037 * 038 * The {@link IValidationContext} can be used to access the resource being validated, 039 * and is populated with the results. 040 */ 041 void validateResource(IValidationContext<IBaseResource> theCtx); 042 043}