View Javadoc
1   package ca.uhn.fhir.rest.gclient;
2   
3   import org.hl7.fhir.instance.model.api.IBaseResource;
4   
5   /*
6    * #%L
7    * HAPI FHIR - Core Library
8    * %%
9    * Copyright (C) 2014 - 2018 University Health Network
10   * %%
11   * Licensed under the Apache License, Version 2.0 (the "License");
12   * you may not use this file except in compliance with the License.
13   * You may obtain a copy of the License at
14   * 
15   * http://www.apache.org/licenses/LICENSE-2.0
16   * 
17   * Unless required by applicable law or agreed to in writing, software
18   * distributed under the License is distributed on an "AS IS" BASIS,
19   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20   * See the License for the specific language governing permissions and
21   * limitations under the License.
22   * #L%
23   */
24  
25  import org.hl7.fhir.instance.model.api.IIdType;
26  
27  public interface IPatchWithBody extends IPatchExecutable {
28  
29  	/**
30  	 * Build a conditional URL using fluent constants on resource types
31  	 * 
32  	 * @param theResourceType
33  	 *           The resource type to patch (e.g. "Patient.class")
34  	 */
35  	IPatchWithQuery conditional(Class<? extends IBaseResource> theClass);
36  
37  	/**
38  	 * Build a conditional URL using fluent constants on resource types
39  	 * 
40  	 * @param theResourceType
41  	 *           The resource type to patch (e.g. "Patient")
42  	 */
43  	IPatchWithQuery conditional(String theResourceType);
44  
45  	/**
46  	 * Specifies that the update should be performed as a conditional create
47  	 * against a given search URL.
48  	 *
49  	 * @param theSearchUrl
50  	 *           The search URL to use. The format of this URL should be of the form <code>[ResourceType]?[Parameters]</code>,
51  	 *           for example: <code>Patient?name=Smith&amp;identifier=13.2.4.11.4%7C847366</code>
52  	 */
53  	IPatchExecutable conditionalByUrl(String theSearchUrl);
54  
55  	/**
56  	 * The resource ID to patch
57  	 */
58  	IPatchExecutable withId(IIdType theId);
59  
60  	/**
61  	 * The resource ID to patch
62  	 */
63  	IPatchExecutable withId(String theId);
64  
65  }