KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jaspersoft > jasperserver > api > engine > scheduling > domain > ReportJobMailNotification


1 /*
2  * Copyright (C) 2006 JasperSoft http://www.jaspersoft.com
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed WITHOUT ANY WARRANTY; and without the
10  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
15  * or write to:
16  *
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place - Suite 330,
19  * Boston, MA USA 02111-1307
20  */

21 package com.jaspersoft.jasperserver.api.engine.scheduling.domain;
22
23 import java.io.Serializable JavaDoc;
24 import java.util.ArrayList JavaDoc;
25 import java.util.List JavaDoc;
26
27 /**
28  * @author Lucian Chirita (lucianc@users.sourceforge.net)
29  * @version $Id: ReportJobMailNotification.java 3583 2006-06-07 10:56:36Z lucian $
30  */

31 public class ReportJobMailNotification implements Serializable JavaDoc {
32     private static final long serialVersionUID = 1L;
33     
34     public static final byte RESULT_SEND = 1;
35     public static final byte RESULT_SEND_ATTACHMENT = 2;
36     
37     private long id;
38     private int version = ReportJob.VERSION_NEW;
39     private List JavaDoc toAddresses;
40     private List JavaDoc ccAddresses;
41     private List JavaDoc bccAddresses;
42     private String JavaDoc subject;
43     private String JavaDoc messageText;
44     private byte resultSendType = RESULT_SEND;
45
46     public ReportJobMailNotification() {
47         super();
48         toAddresses = new ArrayList JavaDoc();
49         ccAddresses = new ArrayList JavaDoc();
50         bccAddresses = new ArrayList JavaDoc();
51     }
52     
53     public long getId() {
54         return id;
55     }
56
57     public void setId(long id) {
58         this.id = id;
59     }
60
61     public int getVersion() {
62         return version;
63     }
64
65     public void setVersion(int version) {
66         this.version = version;
67     }
68
69     public String JavaDoc getMessageText() {
70         return messageText;
71     }
72
73     public void setMessageText(String JavaDoc messageText) {
74         this.messageText = messageText;
75     }
76
77     public byte getResultSendType() {
78         return resultSendType;
79     }
80
81     public void setResultSendType(byte resultSendType) {
82         this.resultSendType = resultSendType;
83     }
84
85     public String JavaDoc getSubject() {
86         return subject;
87     }
88
89     public void setSubject(String JavaDoc subject) {
90         this.subject = subject;
91     }
92
93     public List JavaDoc getBccAddresses() {
94         return bccAddresses;
95     }
96
97     public void setBccAddresses(List JavaDoc bccAddresses) {
98         this.bccAddresses = bccAddresses;
99     }
100     
101     public void addBcc(String JavaDoc address) {
102         this.bccAddresses.add(address);
103     }
104
105     public List JavaDoc getCcAddresses() {
106         return ccAddresses;
107     }
108
109     public void setCcAddresses(List JavaDoc ccAddresses) {
110         this.ccAddresses = ccAddresses;
111     }
112     
113     public void addCc(String JavaDoc address) {
114         this.ccAddresses.add(address);
115     }
116
117     public List JavaDoc getToAddresses() {
118         return toAddresses;
119     }
120
121     public void setToAddresses(List JavaDoc toAddresses) {
122         this.toAddresses = toAddresses;
123     }
124     
125     public void addTo(String JavaDoc address) {
126         this.toAddresses.add(address);
127     }
128
129     public boolean isEmpty() {
130         return getToAddresses().isEmpty();
131     }
132 }
133
Popular Tags