1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.api.annotations.param; 8 9 import java.io.InputStream; 10 11 /** 12 * Test cases where the Payload annotation can be used to specify the parameter to inject the payload of the message, including 13 * doing automatic transforms 14 */ 15 public class PayloadAnnotationComponent 16 { 17 //No transform needed 18 public String processNoTransformString(@Payload String payload) 19 { 20 return payload; 21 } 22 23 //Auto transform from String to InputStream 24 public InputStream processAutoTransformString(@Payload InputStream payload) 25 { 26 return payload; 27 } 28 29 //There is no transformer to go from String to StringBuffer 30 public Object processFailedAutoTransformString(@Payload StringBuffer payload) 31 { 32 return payload; 33 } 34 }