View Javadoc

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