View Javadoc
1   package ca.uhn.fhir.rest.annotation;
2   
3   /*
4    * #%L
5    * HAPI FHIR - Core Library
6    * %%
7    * Copyright (C) 2014 - 2018 University Health Network
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  import java.lang.annotation.*;
23  
24  /**
25   * Denotes a parameter for a REST method which will contain the resource actually 
26   * being created/updated/etc in an operation which contains a resource in the HTTP request.
27   * <p>
28   * For example, in a {@link Create} operation the method parameter annotated with this
29   * annotation will contain the actual resource being created.
30   * </p>
31   * <p>
32   * Parameters with this annotation should typically be of the type of resource being
33   * operated on (see below for an exception when raw data is required). For example, in a
34   * IResourceProvider for Patient resources, the parameter annotated with this
35   * annotation should be of type Patient. 
36   * </p>
37   * <p>
38   * Note that in servers it is also acceptable to have parameters with this annotation
39   * which are of type {@link String} or of type <code>byte[]</code>. Parameters of
40   * these types will contain the raw/unparsed HTTP request body. It is fine to
41   * have multiple parameters with this annotation, so you can have one parameter
42   * which accepts the parsed resource, and another which accepts the raw request.
43   * </p>
44   */
45  @Target(value=ElementType.PARAMETER)
46  @Retention(RetentionPolicy.RUNTIME)
47  public @interface ResourceParam {
48  
49  }