BrightSide Workbench Full Report + Source Code
org.turro.scheduler.motor.Constraints Class Reference

Public Member Functions

DayOfMonthConstraint getDaysOfMonth ()
 
HourConstraint getHours ()
 
MinuteConstraint getMinutes ()
 
MonthConstraint getMonths ()
 
WeekDayConstraint getWeekDays ()
 
boolean isValid (Date date)
 
boolean needsRefresh ()
 
boolean isEmpty ()
 
void readXML (Element root)
 
void writeXML (Element root)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file Constraints.java.

Member Function Documentation

◆ getDaysOfMonth()

DayOfMonthConstraint org.turro.scheduler.motor.Constraints.getDaysOfMonth ( )

Definition at line 41 of file Constraints.java.

41  {
42  return daysOfMonth;
43  }

◆ getHours()

HourConstraint org.turro.scheduler.motor.Constraints.getHours ( )

Definition at line 45 of file Constraints.java.

45  {
46  return hours;
47  }

◆ getMinutes()

MinuteConstraint org.turro.scheduler.motor.Constraints.getMinutes ( )

Definition at line 49 of file Constraints.java.

49  {
50  return minutes;
51  }

◆ getMonths()

MonthConstraint org.turro.scheduler.motor.Constraints.getMonths ( )

Definition at line 53 of file Constraints.java.

53  {
54  return months;
55  }

◆ getWeekDays()

WeekDayConstraint org.turro.scheduler.motor.Constraints.getWeekDays ( )

Definition at line 57 of file Constraints.java.

57  {
58  return weekDays;
59  }

◆ isEmpty()

boolean org.turro.scheduler.motor.Constraints.isEmpty ( )

Definition at line 85 of file Constraints.java.

85  {
86  return months.isEmpty() && daysOfMonth.isEmpty() &&
87  weekDays.isEmpty() && hours.isEmpty() && minutes.isEmpty();
88  }
Here is the caller graph for this function:

◆ isValid()

boolean org.turro.scheduler.motor.Constraints.isValid ( Date  date)

Definition at line 61 of file Constraints.java.

61  {
62  if(isEmpty()) {
63  return false;
64  }
65  boolean valid = months.isValid(date);
66  if(valid) valid = daysOfMonth.isValid(date);
67  if(valid) valid = weekDays.isValid(date);
68  if(valid) valid = hours.isValid(date);
69  if(valid) valid = minutes.isValid(date);
70  return valid;
71  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ needsRefresh()

boolean org.turro.scheduler.motor.Constraints.needsRefresh ( )

Definition at line 73 of file Constraints.java.

73  {
74  if(isEmpty()) {
75  return false;
76  }
77  boolean refresh = months.needsRefresh();
78  if(!refresh) refresh = daysOfMonth.needsRefresh();
79  if(!refresh) refresh = weekDays.needsRefresh();
80  if(!refresh) refresh = hours.needsRefresh();
81  if(!refresh) refresh = minutes.needsRefresh();
82  return refresh;
83  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readXML()

void org.turro.scheduler.motor.Constraints.readXML ( Element  root)

Definition at line 90 of file Constraints.java.

90  {
91  months.readXML(root.getChild("months"));
92  daysOfMonth.readXML(root.getChild("days-of-month"));
93  weekDays.readXML(root.getChild("week-days"));
94  hours.readXML(root.getChild("hours"));
95  minutes.readXML(root.getChild("minutes"));
96  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeXML()

void org.turro.scheduler.motor.Constraints.writeXML ( Element  root)

Definition at line 98 of file Constraints.java.

98  {
99  Element el = new Element("months");
100  root.addContent(el);
101  months.writeXML(el);
102 
103  el = new Element("days-of-month");
104  root.addContent(el);
105  daysOfMonth.writeXML(el);
106 
107  el = new Element("week-days");
108  root.addContent(el);
109  weekDays.writeXML(el);
110 
111  el = new Element("hours");
112  root.addContent(el);
113  hours.writeXML(el);
114 
115  el = new Element("minutes");
116  root.addContent(el);
117  minutes.writeXML(el);
118  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: