
001package ca.uhn.fhir.rest.gclient; 002 003import org.hl7.fhir.instance.model.api.IBaseResource; 004 005/* 006 * #%L 007 * HAPI FHIR - Core Library 008 * %% 009 * Copyright (C) 2014 - 2021 Smile CDR, Inc. 010 * %% 011 * Licensed under the Apache License, Version 2.0 (the "License"); 012 * you may not use this file except in compliance with the License. 013 * You may obtain a copy of the License at 014 * 015 * http://www.apache.org/licenses/LICENSE-2.0 016 * 017 * Unless required by applicable law or agreed to in writing, software 018 * distributed under the License is distributed on an "AS IS" BASIS, 019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 020 * See the License for the specific language governing permissions and 021 * limitations under the License. 022 * #L% 023 */ 024 025import org.hl7.fhir.instance.model.api.IIdType; 026 027public interface IPatchWithBody extends IPatchExecutable { 028 029 /** 030 * Build a conditional URL using fluent constants on resource types 031 * 032 * @param theResourceType 033 * The resource type to patch (e.g. "Patient.class") 034 */ 035 IPatchWithQuery conditional(Class<? extends IBaseResource> theResourceType); 036 037 /** 038 * Build a conditional URL using fluent constants on resource types 039 * 040 * @param theResourceType 041 * The resource type to patch (e.g. "Patient") 042 */ 043 IPatchWithQuery conditional(String theResourceType); 044 045 /** 046 * Specifies that the update should be performed as a conditional create 047 * against a given search URL. 048 * 049 * @param theSearchUrl 050 * The search URL to use. The format of this URL should be of the form <code>[ResourceType]?[Parameters]</code>, 051 * for example: <code>Patient?name=Smith&identifier=13.2.4.11.4%7C847366</code> 052 */ 053 IPatchExecutable conditionalByUrl(String theSearchUrl); 054 055 /** 056 * The resource ID to patch (must include both a resource type and an ID, e.g. <code>Patient/123</code>) 057 */ 058 IPatchExecutable withId(IIdType theId); 059 060 /** 061 * The resource ID to patch (must include both a resource type and an ID, e.g. <code>Patient/123</code>) 062 */ 063 IPatchExecutable withId(String theId); 064 065}