001package ca.uhn.fhir.rest.gclient; 002 003import org.hl7.fhir.instance.model.api.IBaseResource; 004import org.hl7.fhir.instance.model.api.IIdType; 005 006/* 007 * #%L 008 * HAPI FHIR - Core Library 009 * %% 010 * Copyright (C) 2014 - 2021 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 026public interface IDelete { 027 028 IDeleteTyped resource(IBaseResource theResource); 029 030 IDeleteTyped resourceById(IIdType theId); 031 032 IDeleteTyped resourceById(String theResourceType, String theLogicalId); 033 034 /** 035 * Specifies that the delete should be performed as a conditional delete 036 * against a given search URL. 037 * 038 * @param theSearchUrl The search URL to use. The format of this URL should be of the form <code>[ResourceType]?[Parameters]</code>, 039 * for example: <code>Patient?name=Smith&identifier=13.2.4.11.4%7C847366</code> 040 * @since HAPI 0.9 / FHIR DSTU 2 041 */ 042 IDeleteTyped resourceConditionalByUrl(String theSearchUrl); 043 044 /** 045 * Delete using a conditional/match URL. The query parameters will be added in the next part of the call chain. 046 * @since HAPI 0.9 / FHIR DSTU 2 047 */ 048 IDeleteWithQuery resourceConditionalByType(String theResourceType); 049 050 /** 051 * Delete using a conditional/match URL. The query parameters will be added in the next part of the call chain. 052 * @since HAPI 1.3 053 */ 054 IDeleteWithQuery resourceConditionalByType(Class<? extends IBaseResource> theResourceType); 055 056}