001: /*
002: * Copyright 2006 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.core.mail;
017:
018: import java.io.Serializable;
019: import java.util.HashSet;
020: import java.util.Set;
021:
022: /**
023: *
024: *
025: */
026: public class MailMessage implements Serializable {
027: private String fromAddress;
028: private Set toAddresses = new HashSet();
029: private Set ccAddresses = new HashSet();
030: private Set bccAddresses = new HashSet();
031: private String subject = "";
032: private String message = "";
033:
034: public MailMessage() {
035: super ();
036: }
037:
038: public String getFromAddress() {
039: return fromAddress;
040: }
041:
042: public void setFromAddress(String fromAddress) {
043: this .fromAddress = fromAddress;
044: }
045:
046: /**
047: * @return Returns the bccAddresses.
048: */
049: public Set getBccAddresses() {
050: return bccAddresses;
051: }
052:
053: public void addBccAddress(String addr) {
054: bccAddresses.add(addr);
055: }
056:
057: public void removeBccAddress(String addr) {
058: bccAddresses.remove(addr);
059: }
060:
061: /**
062: * @param bccAddresses The bccAddresses to set.
063: */
064: public void setBccAddresses(Set bccAddresses) {
065: this .bccAddresses = bccAddresses;
066: }
067:
068: /**
069: * @return Returns the ccAddresses.
070: */
071: public Set getCcAddresses() {
072: return ccAddresses;
073: }
074:
075: public void addCcAddress(String addr) {
076: ccAddresses.add(addr);
077: }
078:
079: public void removeCcAddress(String addr) {
080: ccAddresses.remove(addr);
081: }
082:
083: /**
084: * @param ccAddresses The ccAddresses to set.
085: */
086: public void setCcAddresses(Set ccAddresses) {
087: this .ccAddresses = ccAddresses;
088: }
089:
090: /**
091: * @return Returns the message.
092: */
093: public String getMessage() {
094: return message;
095: }
096:
097: /**
098: * @param message The message to set.
099: */
100: public void setMessage(String message) {
101: this .message = message;
102: }
103:
104: /**
105: * @return Returns the subject.
106: */
107: public String getSubject() {
108: return subject;
109: }
110:
111: /**
112: * @param subject The subject to set.
113: */
114: public void setSubject(String subject) {
115: this .subject = subject;
116: }
117:
118: /**
119: * @return Returns the toAddresses.
120: */
121: public Set getToAddresses() {
122: return toAddresses;
123: }
124:
125: public void addToAddress(String addr) {
126: toAddresses.add(addr);
127: }
128:
129: public void removeToAddress(String addr) {
130: toAddresses.remove(addr);
131: }
132:
133: /**
134: * @param toAddresses The toAddresses to set.
135: */
136: public void setToAddresses(Set toAddresses) {
137: this.toAddresses = toAddresses;
138: }
139: }
|