1 /*
2 * Copyright 2005-2007 The Kuali Foundation
3 *
4 *
5 * Licensed under the Educational Community License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.opensource.org/licenses/ecl2.php
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package org.kuali.rice.kew.mail;
19
20 /**
21 * Class representing customizable content of an email message
22 * TODO: supercede this with Spring framework and/or JavaMail mail classes
23 * @author Kuali Rice Team (rice.collab@kuali.org)
24 */
25 public class EmailContent {
26 private String subject;
27 private String body;
28 private boolean html;
29
30 public EmailContent() {}
31
32 public EmailContent(String subject, String body) {
33 this.subject = subject;
34 this.body = body;
35 }
36
37 public EmailContent(String subject, String body, boolean html) {
38 this.subject = subject;
39 this.body = body;
40 this.html = html;
41 }
42
43 public void setSubject(String subject) {
44 this.subject = subject;
45 }
46
47 public String getSubject() {
48 return subject;
49 }
50
51 public void setBody(String body, boolean html) {
52 this.body = body;
53 this.html = html;
54 }
55
56 public String getBody() {
57 return body;
58 }
59
60 public boolean isHtml() {
61 return html;
62 }
63
64 public String toString() {
65 return "[EmailContent: subject=" + subject + ", body=" + body + ", html=" + html + "]";
66 }
67 }