View Javadoc
1   package ca.uhn.fhir.rest.gclient;
2   
3   import org.hl7.fhir.instance.model.api.IIdType;
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  public interface IOperation extends IBaseOn<IOperationUnnamed> {
25  
26  	/**
27  	 * This operation operates on a specific version of a resource
28  	 */
29  	IOperationUnnamed onInstanceVersion(IIdType theId);
30  
31  	/**
32  	 * This operation is called <b><a href="https://www.hl7.org/fhir/messaging.html">$process-message</a></b> as defined by the FHIR
33  	 * specification.<br><br>
34  	 * Usage :<br>
35  	 * <code>
36  	 * <pre>
37  	 * Bundle response = client
38  	 * .operation()
39  	 * .processMessage()
40  	 * .synchronous(Bundle.class)
41  	 * .setResponseUrlParam("http://myserver/fhir")
42  	 * .setMessageBundle(msgBundle)
43  	 * .execute();
44  	 *
45  	 * //if you want to send an async message
46  	 *
47  	 * OperationOutcome response = client
48  	 * .operation()
49  	 * .processMessage()
50  	 * .asynchronous(OperationOutcome.class)
51  	 * .setResponseUrlParam("http://myserver/fhir")
52  	 * .setMessageBundle(msgBundle)
53  	 * .execute();
54  	 *
55  	 * </pre>
56  	 * </code>
57  	 *
58  	 * @return An interface that defines the operation related to sending
59  	 * Messages to a Messaging Server
60  	 * @see <a href="https://www.hl7.org/fhir/messaging.html">2.4 Messaging
61  	 * using FHIR Resources</a>
62  	 */
63  	IOperationProcessMsg processMessage();
64  }