001/*- 002 * #%L 003 * HAPI FHIR - Server Framework 004 * %% 005 * Copyright (C) 2014 - 2024 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.rest.api.server.cdshooks; 021 022import ca.uhn.fhir.model.api.IModelJson; 023import com.fasterxml.jackson.annotation.JsonProperty; 024 025/** 026 * @see <a href=" https://cds-hooks.hl7.org/1.0/#extensions">For reading more about Extension support in CDS hooks</a> 027 * Example can be found <a href="https://build.fhir.org/ig/HL7/davinci-crd/deviations.html#configuration-options-extension">here</a> 028 */ 029public abstract class BaseCdsServiceJson implements IModelJson { 030 031 @JsonProperty(value = "extension") 032 CdsHooksExtension myExtension; 033 034 private Class<? extends CdsHooksExtension> myExtensionClass; 035 036 public CdsHooksExtension getExtension() { 037 return myExtension; 038 } 039 040 public BaseCdsServiceJson setExtension(CdsHooksExtension theExtension) { 041 this.myExtension = theExtension; 042 return this; 043 } 044 045 public void setExtensionClass(Class<? extends CdsHooksExtension> theClass) { 046 this.myExtensionClass = theClass; 047 } 048 049 public Class<? extends CdsHooksExtension> getExtensionClass() { 050 return myExtensionClass; 051 } 052}