01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.synapse.transport.mail;
21:
22: import org.apache.axis2.transport.OutTransportInfo;
23:
24: import javax.mail.internet.InternetAddress;
25:
26: /**
27: * The Mail OutTransportInfo is a holder of information to send an outgoing message
28: * (e.g. a Response or a request) to a Mail destination. Thus at a minimum a
29: * destination email address is held
30: */
31: public class MailOutTransportInfo implements OutTransportInfo {
32:
33: /** The address of the destination */
34: private InternetAddress[] targetAddresses = null;
35: /** The address of the service that is replying */
36: private InternetAddress fromAddress = null;
37: /** A list of email addresses to which the reply must be copied */
38: private InternetAddress[] ccAddresses = null;
39: /** The subject for the reply message */
40: private String subject = null;
41: /** The message ID of the request message, when this refers to a reply to it */
42: private String requestMessageID = null;
43:
44: MailOutTransportInfo(InternetAddress fromAddress) {
45: this .fromAddress = fromAddress;
46: }
47:
48: public void setContentType(String contentType) {
49: }
50:
51: public InternetAddress[] getTargetAddresses() {
52: return targetAddresses;
53: }
54:
55: public void setTargetAddresses(InternetAddress[] targetAddresses) {
56: this .targetAddresses = targetAddresses;
57: }
58:
59: public InternetAddress getFromAddress() {
60: return fromAddress;
61: }
62:
63: public InternetAddress[] getCcAddresses() {
64: return ccAddresses;
65: }
66:
67: public void setCcAddresses(InternetAddress[] ccAddresses) {
68: this .ccAddresses = ccAddresses;
69: }
70:
71: public String getSubject() {
72: return subject;
73: }
74:
75: public void setSubject(String subject) {
76: this .subject = subject;
77: }
78:
79: public String getRequestMessageID() {
80: return requestMessageID;
81: }
82:
83: public void setRequestMessageID(String requestMessageID) {
84: this.requestMessageID = requestMessageID;
85: }
86: }
|