KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > efs > openreports > services > input > ReportServiceInput


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

19
20 package org.efs.openreports.services.input;
21
22 import java.io.Serializable JavaDoc;
23 import java.util.Date JavaDoc;
24
25 import org.efs.openreports.engine.ReportEngine;
26 import org.efs.openreports.objects.ReportSchedule;
27 import org.efs.openreports.services.ReportService;
28
29 /**
30  * Standard ReportServiceInput object. UserName and ReportName are required, the rest
31  * are optional. If not specified, exportType defaults to PDF and deliveryMethod
32  * defaults to API.
33  *
34  * @author Erik Swenson
35  */

36
37 public class ReportServiceInput implements Serializable JavaDoc
38 {
39     private static final long serialVersionUID = -3094443722330870862L;
40     
41     private String JavaDoc userName;
42     private String JavaDoc reportName;
43     private int exportType = ReportEngine.EXPORT_PDF;
44     private String JavaDoc deliveryMethod = ReportService.DELIVERY_API;
45     private String JavaDoc[] parameters;
46     
47     // schedule options
48
private Date JavaDoc startDate;
49     private String JavaDoc startHour;
50     private String JavaDoc startMinute;
51     private String JavaDoc startAmPm;
52     private int scheduleType = ReportSchedule.ONCE;
53     private String JavaDoc scheduleDescription;
54     private int hours;
55     private String JavaDoc cronExpression;
56     //
57

58     // not used
59
private String JavaDoc xmlData;
60     
61     public String JavaDoc getUserName()
62     {
63         return userName;
64     }
65
66     public void setUserName(String JavaDoc userName)
67     {
68         this.userName = userName;
69     }
70
71     public String JavaDoc getDeliveryMethod()
72     {
73         return deliveryMethod;
74     }
75     
76     public void setDeliveryMethod(String JavaDoc deliveryMethod)
77     {
78         this.deliveryMethod = deliveryMethod;
79     }
80
81     public int getExportType()
82     {
83         return exportType;
84     }
85
86     public void setExportType(int exportType)
87     {
88         this.exportType = exportType;
89     }
90
91     public String JavaDoc[] getParameters()
92     {
93         return parameters;
94     }
95     
96     /**
97      * String array of parameters. String must be in the following format:
98      * 'city=Boston'
99      */

100     public void setParameters(String JavaDoc[] parameters)
101     {
102         this.parameters = parameters;
103     }
104     
105     public String JavaDoc getReportName()
106     {
107         return reportName;
108     }
109     
110     public void setReportName(String JavaDoc reportName)
111     {
112         this.reportName = reportName;
113     }
114
115     public String JavaDoc getXmlData()
116     {
117         return xmlData;
118     }
119
120     public void setXmlData(String JavaDoc xmlData)
121     {
122         this.xmlData = xmlData;
123     }
124
125     public int getScheduleType()
126     {
127         return scheduleType;
128     }
129
130     public void setScheduleType(int scheduleType)
131     {
132         this.scheduleType = scheduleType;
133     }
134
135     public String JavaDoc getStartAmPm()
136     {
137         return startAmPm;
138     }
139
140     public void setStartAmPm(String JavaDoc startAmPm)
141     {
142         this.startAmPm = startAmPm;
143     }
144
145     public Date JavaDoc getStartDate()
146     {
147         return startDate;
148     }
149
150     public void setStartDate(Date JavaDoc startDate)
151     {
152         this.startDate = startDate;
153     }
154
155     public String JavaDoc getStartHour()
156     {
157         return startHour;
158     }
159
160     public void setStartHour(String JavaDoc startHour)
161     {
162         this.startHour = startHour;
163     }
164
165     public String JavaDoc getStartMinute()
166     {
167         return startMinute;
168     }
169
170     public void setStartMinute(String JavaDoc startMinute)
171     {
172         this.startMinute = startMinute;
173     }
174
175     public String JavaDoc getScheduleDescription()
176     {
177         return scheduleDescription;
178     }
179
180     public void setScheduleDescription(String JavaDoc scheduleDescription)
181     {
182         this.scheduleDescription = scheduleDescription;
183     }
184
185     public String JavaDoc getCronExpression()
186     {
187         return cronExpression;
188     }
189
190     public void setCronExpression(String JavaDoc cronExpression)
191     {
192         this.cronExpression = cronExpression;
193     }
194
195     public int getHours()
196     {
197         return hours;
198     }
199
200     public void setHours(int hours)
201     {
202         this.hours = hours;
203     }
204 }
205
Popular Tags