View Javadoc
1   package ca.uhn.fhir.rest.annotation;
2   
3   import java.lang.annotation.ElementType;
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 java.lang.annotation.Retention;
26  import java.lang.annotation.RetentionPolicy;
27  import java.lang.annotation.Target;
28  
29  import org.hl7.fhir.instance.model.api.IBaseResource;
30  
31  /**
32   * RESTful method annotation to be used for the proposed FHIR
33   * PATCH method
34   * 
35   * <p>
36   * Patch is used to apply a differential to a resource in either
37   * XML or JSON format
38   * </p>
39   */
40  @Retention(RetentionPolicy.RUNTIME)
41  @Target({ ElementType.METHOD })
42  public @interface Patch {
43  
44  	/**
45  	 * The return type for this search method. This generally does not need
46  	 * to be populated for a server implementation, since servers will return
47  	 * only one resource per class, but generally does need to be populated
48  	 * for client implementations.
49  	 */
50  	// NB: Read, Search (maybe others) share this annotation, so update the javadocs everywhere
51  	Class<? extends IBaseResource> type() default IBaseResource.class;
52  
53  }