001package ca.uhn.fhir.rest.annotation; 002 003/* 004 * #%L 005 * HAPI FHIR - Core Library 006 * %% 007 * Copyright (C) 2014 - 2017 University Health Network 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022import java.lang.annotation.*; 023 024/** 025 * Denotes a parameter for a REST method which will contain the resource actually 026 * being created/updated/etc in an operation which contains a resource in the HTTP request. 027 * <p> 028 * For example, in a {@link Create} operation the method parameter annotated with this 029 * annotation will contain the actual resource being created. 030 * </p> 031 * <p> 032 * Parameters with this annotation should typically be of the type of resource being 033 * operated on (see below for an exception when raw data is required). For example, in a 034 * IResourceProvider for Patient resources, the parameter annotated with this 035 * annotation should be of type Patient. 036 * </p> 037 * <p> 038 * Note that in servers it is also acceptable to have parameters with this annotation 039 * which are of type {@link String} or of type <code>byte[]</code>. Parameters of 040 * these types will contain the raw/unparsed HTTP request body. It is fine to 041 * have multiple parameters with this annotation, so you can have one parameter 042 * which accepts the parsed resource, and another which accepts the raw request. 043 * </p> 044 */ 045@Target(value=ElementType.PARAMETER) 046@Retention(RetentionPolicy.RUNTIME) 047public @interface ResourceParam { 048 049}