1 package org.codehaus.xfire.attachments;
2
3 import java.io.IOException;
4 import java.io.OutputStream;
5 import java.util.Iterator;
6
7 /***
8 * Manages attachments for an invocation.
9 *
10 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
11 */
12 public interface Attachments
13 {
14 /*** The key for the Attachments object in the MessageContext. */
15 String ATTACHMENTS_KEY = "xfire.attachments";
16
17 /***
18 * @return Returns the SOAP Message.
19 */
20 Attachment getSoapMessage();
21
22 /***
23 * @param soapMessage The SOAP Message to set.
24 */
25 void setSoapMessage(Attachment soapMessage);
26
27 void addPart(Attachment part);
28
29 Iterator getParts();
30
31 Attachment getPart(String id);
32
33 int size();
34
35 void write(OutputStream out) throws IOException;
36
37 String getContentType();
38 }