示例#1
0
 public Trigger()
 {
     Periodical periodical = new Periodical();
     this.periodical = periodical;
     Single single = new Single();
     this.single = single;
 }
示例#2
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);
 }
 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;
 }
示例#4
0
        public TriggerPayload()
        {
            Periodical periodical = new Periodical();

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

            this.single = single;
        }
示例#5
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;
        }
示例#6
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);
 }
示例#7
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);
 }
示例#8
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);
 }
 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);
 }
示例#10
0
 public Trigger()
 {
     this.periodical = new Periodical();
     this.single     = new Single();
 }
示例#11
0
 public TriggerPayload(Periodical periodical)
 {
     this.periodical = periodical;
     this.single     = null;
     throw new System.NotImplementedException();
 }
示例#12
0
 public TriggerPayload(Single single)
 {
     this.single     = single;
     this.periodical = null;
     throw new System.NotImplementedException();
 }
 public void TriggerPayloadPeriodicalNullTest()
 {
     Periodical periodical = new Periodical();
     periodical = null;
     TriggerPayload periodicalpayload = new TriggerPayload(periodical);
 }
示例#14
0
 public Trigger(Periodical periodical)
 {
     this.periodical = periodical;
     single = null;
     throw new System.NotImplementedException();
 }
示例#15
0
 public Trigger(Single single)
 {
     this.single = single;
     this.periodical = null;
     throw new System.NotImplementedException();
 }
示例#16
0
 public Trigger(Single single)
 {
     this.single     = single;
     this.periodical = (Periodical)null;
     //throw new NotImplementedException();
 }
示例#17
0
 public Trigger(Periodical periodical)
 {
     this.periodical = periodical;
     this.single     = (Single)null;
     //throw new NotImplementedException();
 }
 // "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;
 }