Coverage report

| %line | %branch
--- | --- | ---
org.apache.stratum.scheduler.TriggerConfig |
100% |
100% |

1 |  |
     package org.apache.stratum.scheduler;
2 |  |
3 |  |
     /*
4 |  |
      * Copyright 2001-2005 The Apache Software Foundation or its licensors,
5 |  |
      * as applicable.
6 |  |
      *
7 |  |
      * Licensed under the Apache License, Version 2.0 (the "License");
8 |  |
      * you may not use this file except in compliance with the License.
9 |  |
      * You may obtain a copy of the License at
10 |  |
      *
11 |  |
      *     http://www.apache.org/licenses/LICENSE-2.0
12 |  |
      *
13 |  |
      * Unless required by applicable law or agreed to in writing, software
14 |  |
      * distributed under the License is distributed on an "AS IS" BASIS,
15 |  |
      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 |  |
      * See the License for the specific language governing permissions and
17 |  |
      * limitations under the License.
18 |  |
      */
19 |  |
20 |  |
     /**
21 |  |
      * This bean represents the settings used to create a Trigger object for use in the Quartz scheduler
22 |  |
      * <pre>
23 |  |
      *  This trigger is a Quartz trigger that uses a "Cron-Expression" which
24 |  |
      *  is a string comprised of 6 fields separated by white space. The 6
25 |  |
      *  fields are as follows:
26 |  |
      *   Field Name   Allowed Values   Allowed Special Characters
27 |  |
      *  seconds      0-59             , - * /
28 |  |
      *  minutes      0-59             , - * /
29 |  |
      *  hours        0-23             , - * /
30 |  |
      *  dayOfMonth   0-31             , - * ? / L C
31 |  |
      *  month        1-12 or JAN-DEC  , - * /
32 |  |
      *  dayOfWeek    1-7 or SUN-SAT   , - * ? / L C
33 |  |
      *    -The '*' character is used to specify all values. For example, "*" in
34 |  |
      *    the minute field means "every minute".
35 |  |
      *    -The '?' character is allowed for the day-of-month and day-of-week
36 |  |
      *    fields. It is used to specify 'no specific value'. This is useful when
37 |  |
      *    you need to specify something in one of the two fileds, but not the
38 |  |
      *    other. See the examples below for clarification.
39 |  |
      *    -The '-' character is used to specify ranges For example "10-12" in
40 |  |
      *    the hour field means "the hours 10, 11 and 12".
41 |  |
      *    -The ',' character is used to specify additional values. For example
42 |  |
      *    "MON,WED,FRI" in the day-of-week field means "the days Monday,
43 |  |
      *    Wednesday, and Friday".
44 |  |
      *    -The '/' character is used to specify increments. For example "0/15"
45 |  |
      *    in the seconds field means "the seconds 0, 15, 30, and 45". And "5/15"
46 |  |
      *    in the seconds field means "the seconds 5, 20, 35, and 50". You can \
47 |  |
      *    also specify '/' after the '*' character - in this case '*' is
48 |  |
      *    equivalent to having '0' before the '/'.
49 |  |
      *    -The 'L' character is allowed for the day-of-month and day-of-week
50 |  |
      *    fields. This character is short-hand for "last", but it has different
51 |  |
      *    meaning in each of the two fields. For example, the value "L" in the
52 |  |
      *    day-of-month field means "the last day of the month" - day 31 for
53 |  |
      *    January, day 28 for February on non-leap years. If used in the
54 |  |
      *    day-of-week field by itself, it simply means "7" or "SAT". But if
55 |  |
      *    used in the day-of-week field after another value, it means "the
56 |  |
      *    last xxx day of the month" - for example "6L" or "FRIL" both mean
57 |  |
      *    "the last friday of the month". When using the 'L' option, it is
58 |  |
      *    important not to specify lists, or ranges of values, as you'll get
59 |  |
      *    confusing results.
60 |  |
      *    -The 'C' character is allowed for the day-of-month and day-of-week
61 |  |
      *    fields. This character is short-hand for "calendar". This means values
62 |  |
      *    are calculated against the associated calendar, if any. If no calendar
63 |  |
      *    is associated, then it is equivalent to having an all-inclusive
64 |  |
      *    calendar. A value of "5C" in the day-of-month field means "the first
65 |  |
      *    day included by the calendar on or after the 5th". A value of "1C" in
66 |  |
      *    the day-of-week field means "the first day included by the calendar on
67 |  |
      *    or after sunday".
68 |  |
      * </pre>
69 |  |
      *
70 |  |
      * @author <a href="mailto:john@zenplex.com">John Thorhauer</a>
71 |  |
      * @version $Id: TriggerConfig.java 264191 2005-08-29 18:07:52Z henning $
72 |  |
      */
73 |  |
     public class TriggerConfig
74 |  |
     {
75 |  |
         /** The name of the trigger */
76 |  |
         private String name;
77 |  |
78 |  |
         /** The name of the job to associate with this this trigger. */
79 |  |
         private String jobName;
80 |  |
81 |  |
         /** The name of the group to associate this trigger with */
82 |  |
         private String group;
83 |  |
84 |  |
         /**  */
85 |  |
86 |  |
         /** TODO: DOCUMENT ME! */
87 | 36 |
         private String seconds = "*";
88 |  |
89 |  |
         /**  */
90 |  |
91 |  |
         /** TODO: DOCUMENT ME! */
92 | 36 |
         private String minutes = "*";
93 |  |
94 |  |
         /**  */
95 |  |
96 |  |
         /** TODO: DOCUMENT ME! */
97 | 36 |
         private String hours = "*";
98 |  |
99 |  |
         /**  */
100 |  |
101 |  |
         /** TODO: DOCUMENT ME! */
102 | 36 |
         private String dayOfMonth = "*";
103 |  |
104 |  |
         /**  */
105 |  |
106 |  |
         /** TODO: DOCUMENT ME! */
107 | 40 |
         private String month = "*";
108 |  |
109 |  |
         /**  */
110 |  |
111 |  |
         /** TODO: DOCUMENT ME! */
112 | 36 |
         private String dayOfWeek = "*";
113 | 4 |
114 |  |
         /**
115 | 4 |
          * Default contructor
116 |  |
          */
117 |  |
         public TriggerConfig()
118 | 36 |
         {
119 | 36 |
         }
120 |  |
121 | 4 |
         /**
122 |  |
          * This is the name of the trigger
123 | 4 |
          *
124 |  |
          * @param s trigger name
125 |  |
          */
126 |  |
         public void setName(String s)
127 |  |
         {
128 | 36 |
             this.name = s;
129 | 40 |
         }
130 |  |
131 | 4 |
         /**
132 |  |
          * DOCUMENT ME!
133 |  |
          *
134 |  |
          * @return the name of the trigger
135 |  |
          */
136 |  |
         public String getName()
137 | 4 |
         {
138 | 18 |
             return this.name;
139 | 4 |
         }
140 |  |
141 |  |
         /**
142 |  |
          * This is the name of group that the trigger is associated with
143 |  |
          *
144 |  |
          * @param s group name
145 | 4 |
          */
146 |  |
         public void setGroup(String s)
147 | 4 |
         {
148 | 36 |
             this.group = s;
149 | 36 |
         }
150 |  |
151 |  |
         /**
152 |  |
          * DOCUMENT ME!
153 | 8 |
          *
154 | 4 |
          * @return the group name
155 |  |
          */
156 |  |
         public String getGroup()
157 |  |
         {
158 | 18 |
             return this.group;
159 | 4 |
         }
160 | 4 |
161 |  |
         /**
162 |  |
          * This is the name of job that the trigger is associated with
163 | 4 |
          *
164 | 4 |
          * @param s job name
165 |  |
          */
166 |  |
         public void setJobName(String s)
167 |  |
         {
168 | 36 |
             this.jobName = s;
169 | 40 |
         }
170 | 4 |
171 | 2 |
         /**
172 |  |
          * DOCUMENT ME!
173 |  |
          *
174 |  |
          * @return the job name
175 |  |
          */
176 |  |
         public String getJobName()
177 | 2 |
         {
178 | 27 |
             return this.jobName;
179 |  |
         }
180 |  |
181 | 4 |
         /**
182 | 4 |
          * <pre>
183 |  |
          *  Field Name   Allowed Values   Allowed Special Characters
184 |  |
          *  seconds      0-59             , - * /
185 |  |
          * </pre>
186 |  |
          *
187 | 4 |
          * @param s seconds
188 | 4 |
          */
189 | 2 |
         public void setSeconds(String s)
190 |  |
         {
191 | 36 |
             this.seconds = s;
192 | 36 |
         }
193 |  |
194 |  |
         /**
195 | 2 |
          * DOCUMENT ME!
196 |  |
          *
197 |  |
          * @return seconds
198 |  |
          */
199 | 4 |
         public String getSeconds()
200 | 4 |
         {
201 | 18 |
             return this.seconds;
202 |  |
         }
203 |  |
204 |  |
         /**
205 | 4 |
          * <pre>
206 | 4 |
          *  Field Name   Allowed Values   Allowed Special Characters
207 | 3 |
          *  minutes      0-59             , - * /
208 |  |
          * </pre>
209 |  |
          *
210 |  |
          * @param s minutes
211 |  |
          */
212 |  |
         public void setMinutes(String s)
213 | 3 |
         {
214 | 36 |
             this.minutes = s;
215 | 36 |
         }
216 |  |
217 |  |
         /**
218 |  |
          * DOCUMENT ME!
219 |  |
          *
220 | 4 |
          * @return mintutes
221 | 4 |
          */
222 |  |
         public String getMinutes()
223 |  |
         {
224 | 18 |
             return this.minutes;
225 |  |
         }
226 | 4 |
227 | 4 |
         /**
228 | 2 |
          * <pre>
229 |  |
          *  Field Name   Allowed Values   Allowed Special Characters
230 |  |
          *  hours        0-23             , - * /
231 |  |
          * </pre>
232 |  |
          *
233 |  |
          * @param s hours
234 | 2 |
          */
235 |  |
         public void setHours(String s)
236 |  |
         {
237 | 36 |
             this.hours = s;
238 | 36 |
         }
239 |  |
240 |  |
         /**
241 | 4 |
          * DOCUMENT ME!
242 | 4 |
          *
243 |  |
          * @return hours
244 |  |
          */
245 |  |
         public String getHours()
246 |  |
         {
247 | 22 |
             return this.hours;
248 | 4 |
         }
249 | 2 |
250 |  |
         /**
251 |  |
          * <pre>
252 |  |
          *  Field Name   Allowed Values   Allowed Special Characters
253 |  |
          *  dayOfMonth   0-31             , - * ? / L C
254 |  |
          * </pre>
255 | 2 |
          *
256 |  |
          * @param s day of month
257 |  |
          */
258 |  |
         public void setDayOfMonth(String s)
259 |  |
         {
260 | 36 |
             this.dayOfMonth = s;
261 | 36 |
         }
262 | 4 |
263 | 4 |
         /**
264 |  |
          * DOCUMENT ME!
265 |  |
          *
266 |  |
          * @return day of month
267 |  |
          */
268 | 4 |
         public String getDayOfMonth()
269 | 4 |
         {
270 | 20 |
             return this.dayOfMonth;
271 |  |
         }
272 |  |
273 |  |
         /**
274 |  |
          * <pre>
275 |  |
          *  Field Name   Allowed Values   Allowed Special Characters
276 | 2 |
          *  month        1-12 or JAN-DEC  , - * /
277 |  |
          * </pre>
278 |  |
          *
279 |  |
          * @param s month
280 |  |
          */
281 |  |
         public void setMonth(String s)
282 |  |
         {
283 | 40 |
             this.month = s;
284 | 40 |
         }
285 |  |
286 |  |
         /**
287 |  |
          * DOCUMENT ME!
288 |  |
          *
289 | 4 |
          * @return month
290 | 4 |
          */
291 | 2 |
         public String getMonth()
292 |  |
         {
293 | 18 |
             return this.month;
294 |  |
         }
295 |  |
296 |  |
         /**
297 | 2 |
          * <pre>
298 |  |
          *  Field Name   Allowed Values   Allowed Special Characters
299 |  |
          *  dayOfWeek    1-7 or SUN-SAT   , - * ? / L C
300 |  |
          * </pre>
301 |  |
          *
302 |  |
          * @param s day of the week
303 |  |
          */
304 | 4 |
         public void setDayOfWeek(String s)
305 | 4 |
         {
306 | 36 |
             this.dayOfWeek = s;
307 | 36 |
         }
308 |  |
309 |  |
         /**
310 | 4 |
          * DOCUMENT ME!
311 | 4 |
          *
312 | 2 |
          * @return day of the week
313 |  |
          */
314 |  |
         public String getDayOfWeek()
315 |  |
         {
316 | 18 |
             return this.dayOfWeek;
317 |  |
         }
318 | 2 |
     }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.