KickJava   Java API By Example, From Geeks To Geeks.

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


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
22 package com.jaspersoft.jasperserver.api.engine.scheduling.domain;
23
24 import java.io.Serializable JavaDoc;
25 import java.util.HashSet JavaDoc;
26 import java.util.Set JavaDoc;
27
28
29
30 /**
31  * @author Lucian Chirita (lucianc@users.sourceforge.net)
32  * @version $Id: ReportJob.java 3753 2006-06-19 18:30:31Z lucian $
33  */

34 public class ReportJob implements Serializable JavaDoc {
35     private static final long serialVersionUID = 1L;
36
37     public static final int VERSION_NEW = -1;
38     
39     public static final byte OUTPUT_FORMAT_PDF = 1;
40     public static final byte OUTPUT_FORMAT_HTML = 2;
41     public static final byte OUTPUT_FORMAT_XLS = 3;
42     public static final byte OUTPUT_FORMAT_RTF = 4;
43
44     private long id;
45     private int version = VERSION_NEW;
46     private String JavaDoc username;
47     private String JavaDoc label;
48     private String JavaDoc description;
49     private ReportJobTrigger trigger;
50     private ReportJobSource source;
51     private String JavaDoc baseOutputFilename;
52     private Set JavaDoc outputFormats;
53     private String JavaDoc outputLocale;
54     private ReportJobRepositoryDestination contentRepositoryDestination;
55     private ReportJobMailNotification mailNotification;
56
57     public ReportJob() {
58         outputFormats = new HashSet JavaDoc();
59     }
60
61     public long getId() {
62         return id;
63     }
64
65     public void setId(long id) {
66         this.id = id;
67     }
68
69     public int getVersion() {
70         return version;
71     }
72
73     public void setVersion(int version) {
74         this.version = version;
75     }
76
77     public ReportJobSource getSource() {
78         return source;
79     }
80
81     public void setSource(ReportJobSource source) {
82         this.source = source;
83     }
84
85     public ReportJobTrigger getTrigger() {
86         return trigger;
87     }
88
89     public void setTrigger(ReportJobTrigger trigger) {
90         this.trigger = trigger;
91     }
92
93     public ReportJobMailNotification getMailNotification() {
94         return mailNotification;
95     }
96
97     public void setMailNotification(ReportJobMailNotification mailNotification) {
98         this.mailNotification = mailNotification;
99     }
100
101     public ReportJobRepositoryDestination getContentRepositoryDestination() {
102         return contentRepositoryDestination;
103     }
104
105     public void setContentRepositoryDestination(
106             ReportJobRepositoryDestination contentRepositoryDestination) {
107         this.contentRepositoryDestination = contentRepositoryDestination;
108     }
109
110     public String JavaDoc getDescription() {
111         return description;
112     }
113
114     public void setDescription(String JavaDoc description) {
115         this.description = description;
116     }
117
118     public String JavaDoc getLabel() {
119         return label;
120     }
121
122     public void setLabel(String JavaDoc label) {
123         this.label = label;
124     }
125
126     public String JavaDoc getBaseOutputFilename() {
127         return baseOutputFilename;
128     }
129
130     public void setBaseOutputFilename(String JavaDoc baseOutputFilename) {
131         this.baseOutputFilename = baseOutputFilename;
132     }
133
134     public Set JavaDoc getOutputFormats() {
135         return outputFormats;
136     }
137
138     public void setOutputFormats(Set JavaDoc outputFormats) {
139         this.outputFormats = outputFormats;
140     }
141     
142     public boolean addOutputFormat(byte outputFormat) {
143         return outputFormats.add(new Byte JavaDoc(outputFormat));
144     }
145     
146     public boolean removeOutputFormat(byte outputFormat) {
147         return outputFormats.remove(new Byte JavaDoc(outputFormat));
148     }
149
150     public String JavaDoc getUsername() {
151         return username;
152     }
153
154     public void setUsername(String JavaDoc username) {
155         this.username = username;
156     }
157
158     public String JavaDoc getOutputLocale() {
159         return outputLocale;
160     }
161
162     public void setOutputLocale(String JavaDoc outputLocale) {
163         this.outputLocale = outputLocale;
164     }
165 }
166
Popular Tags