Esempio n. 1
0
 // "time": "2014-09-17 12:00:00"  //YYYY-MM-DD HH:MM:SS
 public TriggerPayload setSingleTime(string time)
 {
     Preconditions.checkArgument(!String.IsNullOrEmpty(time), "The time must not be empty.");
     Preconditions.checkArgument(!StringUtil.IsTime(time), "The time must be the right format.");
     this.single.setTime(time);
     this.periodical = null;
     return(this);
 }
Esempio n. 2
0
        public TriggerPayload()
        {
            Periodical periodical = new Periodical();

            this.periodical = periodical;
            Single single = new Single();

            this.single = single;
        }
Esempio n. 3
0
        public TriggerPayload(String time)
        {
            Preconditions.checkArgument(!String.IsNullOrEmpty(time), "The time must not be empty.");
            Preconditions.checkArgument(StringUtil.IsDateTime(time), "the time is not valid");
            Single single = new Single();

            single.setTime(time);
            this.periodical = null;
            this.single     = single;
        }
Esempio n. 4
0
 public Trigger(String start, String end, String time, String time_unit, int frequency, String[] point)
 {
     Preconditions.checkArgument(!String.IsNullOrEmpty(start), "The start time must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(end), "The end time must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(time), "The time must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(time_unit), "The time_unit must not be empty.");
     Preconditions.checkArgument(StringUtil.IsNumber(frequency.ToString()), "The frequency must be number.");
     Preconditions.checkArgument(StringUtil.IsDateTime(start), "The start time is not valid.");
     Preconditions.checkArgument(StringUtil.IsDateTime(end), "The end time is not valid.");
     Preconditions.checkArgument(StringUtil.IsTime(time), "The time must be the right format.");
     this.periodical = new Periodical(start, end, time, time_unit, frequency, point);
 }
Esempio n. 5
0
 public TriggerPayload(String start, String end, String time, String time_unit, int frequency, String[] point)
 {
     Preconditions.checkArgument(!String.IsNullOrEmpty(start), "The start must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(end), "The end must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(time), "The time must not be empty.");
     Preconditions.checkArgument(!String.IsNullOrEmpty(time_unit), "The time_unit must not be empty.");
     Preconditions.checkArgument(StringUtil.IsNumber(frequency.ToString()), "The frequency must be number.");
     Preconditions.checkArgument(StringUtil.IsDateTime(start), "The start is not valid.");
     Preconditions.checkArgument(StringUtil.IsDateTime(end), "The end is not valid.");
     Preconditions.checkArgument(StringUtil.IsTime(time), "The time must be the right format.");
     Preconditions.checkArgument((0 < frequency && frequency < 101), "The frequency must be less than 100.");
     Preconditions.checkArgument(StringUtil.IsTimeunit(time_unit), "The time_unit must be the right format.");
     this.single     = null;
     this.periodical = new Periodical(start, end, time, time_unit, frequency, point);
 }
Esempio n. 6
0
 public TriggerPayload(Periodical periodical)
 {
     this.periodical = periodical;
     this.single     = null;
     throw new System.NotImplementedException();
 }
Esempio n. 7
0
 public TriggerPayload(Single single)
 {
     this.single     = single;
     this.periodical = null;
     throw new System.NotImplementedException();
 }