made sure, every job has a name

corrected comments: we use commas instead of semi-colons
This commit is contained in:
stefanp 2003-03-07 09:39:17 +00:00
parent 75fbf7588f
commit 6482af48a1

View file

@ -111,42 +111,42 @@ public class CronJob {
* <ul><dl> * <ul><dl>
* <dt><tt>year-list</tt></dt> * <dt><tt>year-list</tt></dt>
** <dd> ** <dd>
** This is a semi-colon (<tt>;</tt>) separated list of individual ** This is a comma (<tt>,</tt>) separated list of individual
* years or of year ranges. Examples: "<tt>1999;2000</tt>" or * years or of year ranges. Examples: "<tt>1999,2000</tt>" or
* "<tt>1999-2004;2005-2143;2650</tt>" * "<tt>1999-2004,2005-2143,2650</tt>"
* </dd><P> * </dd><P>
* *
* <dt><tt>month-list</tt></dt> * <dt><tt>month-list</tt></dt>
* <dd> * <dd>
* This is a semi-colon (<tt>;</tt>) separated list of month * This is a comma (<tt>,</tt>) separated list of month
* names. Example: "<tt>january;march;may</tt>" * names. Example: "<tt>january,march,may</tt>"
* </dd><P> * </dd><P>
* *
* <dt><tt>day-list</tt></dt> * <dt><tt>day-list</tt></dt>
* <dd> * <dd>
* This is a semi-colon (<tt>;</tt>) separated list of individual * This is a comma (<tt>,</tt>) separated list of individual
* day-of-month numbers or of day-of-month ranges. * day-of-month numbers or of day-of-month ranges.
* Examples: "<tt>1;15</tt>" or "<tt>1-5;7;10-24</tt>" * Examples: "<tt>1,15</tt>" or "<tt>1-5,7,10-24</tt>"
* </dd><P> * </dd><P>
* *
* <dt><tt>weekday-list</tt></dt> * <dt><tt>weekday-list</tt></dt>
* <dd> * <dd>
* This is a semi-colon (<tt>;</tt>) separated list of weekday names * This is a comma (<tt>,</tt>) separated list of weekday names
* names. Example: "<tt>monday;tuesday</tt>" * names. Example: "<tt>monday,tuesday</tt>"
* </dd><P> * </dd><P>
* *
* <dt><tt>hour-list</tt></dt> * <dt><tt>hour-list</tt></dt>
* <dd> * <dd>
* This is a semi-colon (<tt>;</tt>) separated list of individual * This is a comma (<tt>,</tt>) separated list of individual
* hours-of-day (24-hour time) or of hour-of-day ranges. * hours-of-day (24-hour time) or of hour-of-day ranges.
* Examples: "<tt>12;15</tt>" or "<tt>8-17;19;20-22</tt>" * Examples: "<tt>12,15</tt>" or "<tt>8-17,19,20-22</tt>"
* </dd><P> * </dd><P>
* *
* <dt><tt>minute-list</tt></dt> * <dt><tt>minute-list</tt></dt>
* <dd> * <dd>
* This is a semi-colon (<tt>;</tt>) separated list of individual * This is a comma (<tt>,</tt>) separated list of individual
* minutes (during an hour) or of minute ranges. * minutes (during an hour) or of minute ranges.
* Examples: "<tt>0;15;30;45</tt>" or "<tt>0-5;8-14;23;28-32</tt>" * Examples: "<tt>0,15,30,45</tt>" or "<tt>0-5,8-14,23,28-32</tt>"
* </dd><P> * </dd><P>
* *
* </dl></ul> * </dl></ul>
@ -177,7 +177,7 @@ public class CronJob {
continue; continue;
CronJob job = (CronJob) jobs.get (jobName); CronJob job = (CronJob) jobs.get (jobName);
if (job==null) { if (job==null) {
job = new CronJob (); job = new CronJob (jobName);
jobs.put (jobName, job); jobs.put (jobName, job);
} }
String value = props.getProperty (key); String value = props.getProperty (key);
@ -355,7 +355,8 @@ public class CronJob {
/** /**
* Create an empty CronJob. * Create an empty CronJob.
*/ */
public CronJob () { public CronJob (String name) {
this.name = name;
all.put (ALL_VALUE, value); all.put (ALL_VALUE, value);
year = new Hashtable (all); year = new Hashtable (all);
month = new Hashtable (all); month = new Hashtable (all);
@ -615,6 +616,22 @@ public class CronJob {
} }
/**
* Set this entry's name
*/
public void setName(String name)
{
this.name = name;
}
/**
* Get this entry's name
*/
public String getName()
{
return this.name;
}
/** /**
* Set this entry's function * Set this entry's function
*/ */