From ips@fedoraproject.org Thu Aug 20 10:16:02 2015 From: ips To: rhq-commits@lists.fedorahosted.org Subject: [rhq] modules/core Date: Wed, 15 Dec 2010 19:16:15 +0000 Message-ID: <20101215191615.6302B1205AD@lists.fedorahosted.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8305227639763223740==" --===============8305227639763223740== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable modules/core/domain/src/main/java/org/rhq/core/domain/common/Trigger.java | = 34 +++++++++- 1 file changed, 31 insertions(+), 3 deletions(-) New commits: commit 32e6e65b458760a74ae2a99be476a817ac6eee1f Author: Ian Springer Date: Wed Dec 15 14:15:54 2010 -0500 add more Javadoc to Trigger class diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/common/Tri= gger.java b/modules/core/domain/src/main/java/org/rhq/core/domain/common/Trig= ger.java index 116ec06..6f6756c 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/common/Trigger.ja= va +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/common/Trigger.ja= va @@ -34,7 +34,7 @@ public class Trigger { // For the remaining fields in this class, only those that apply to the = trigger's type will have non-null values. private StartType startType; private RecurrenceType recurrenceType; - // Note, this field will be null when recurrenceType=3DNONE, since is no= t applicable in that case. + // Note, this field will be null when recurrenceType=3DNONE, since it's = not applicable in that case. private EndType endType; =20 // Fields used by startType=3DDATETIME triggers @@ -51,19 +51,45 @@ public class Trigger { private String cronExpression; =20 public enum StartType { + /** + * Start the initial run now. + */ NOW, + /** + * Start the initial run at a specified date-time in the future. + */ DATETIME; } =20 public enum RecurrenceType { + /** + * No recurrence - just run once. + */ NONE, + /** + * Run every n seconds, starting at the start time of the initial ru= n. + */ REPEAT_INTERVAL, + /** + * Run on a schedule based on the specified cron expression. The exp= ression must follow + * Quartz + * cron expression syntax, which is a bit different than Unix cr= on expression syntax. + */ CRON_EXPRESSION; } =20 public enum EndType { + /** + * No end - recurrence is indefinite. + */ NEVER, + /** + * End recurrence at a specified date/time in the future. + */ DATETIME, + /** + * End recurrence after n repetitions. + */ REPEAT_COUNT; } =20 @@ -172,9 +198,11 @@ public class Trigger { } =20 /** - * Create a trigger that will run on the schedule specified by cron expr= ession + * Create a trigger that will run on the schedule specified by a cron ex= pression. The expression must follow + * Quartz + * cron expression syntax, which is a bit different than Unix cron e= xpression syntax. * - * @return a trigger that will run on the schedule specified by cron exp= ression + * @return a trigger that will run on the schedule specified by a cron e= xpression */ public static Trigger createCronTrigger(String cronExpression) { return new Trigger(cronExpression); --===============8305227639763223740==--