1 /*
2 * $Id: OutboundAttachments.java 20321 2010-11-24 15:21:24Z dfeist $
3 * --------------------------------------------------------------------------------------
4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
5 *
6 * The software in this package is published under the terms of the CPAL v1.0
7 * license, a copy of which has been included with this distribution in the
8 * LICENSE.txt file.
9 */
10
11 package org.mule.api.annotations.param;
12
13 import org.mule.api.annotations.meta.Evaluator;
14
15 import java.lang.annotation.Documented;
16 import java.lang.annotation.ElementType;
17 import java.lang.annotation.Retention;
18 import java.lang.annotation.RetentionPolicy;
19 import java.lang.annotation.Target;
20
21 /**
22 * Used on component methods, this parameter annotation passes in a reference to a {@link java.util.Map} that can be used to populate
23 * outbound attachments that will be set with the outgoing message. For example, when sending an email message,
24 * you may want to add attachments such as images or documents.
25 * <p/>
26 * This annotation must only be defined on a parameter of type {@link java.util.Map}. The elements in the map will be
27 * of type {@link javax.activation.DataHandler}, thus the annotated parameter should be defined as {@link java.util.Map<java.lang.String, javax.activation.DataHandler>}
28 * Where the key is the attachment name and the value is the handler for the attachment.
29 */
30 @Target(ElementType.PARAMETER)
31 @Retention(RetentionPolicy.RUNTIME)
32 @Documented
33 @Evaluator("outboundAttachments")
34 public @interface OutboundAttachments
35 {
36 }