18 package org.turro.scheduler.constraints;
20 import java.util.Calendar;
21 import java.util.Date;
22 import java.util.HashSet;
23 import java.util.List;
24 import org.jdom.Element;
33 private Integer lastCheck;
34 private boolean refresh;
37 Element parent = root.getChild(
"day-of-month-constraint");
38 for(Element el : (List<Element>) parent.getChildren(
"day")) {
39 add(Integer.valueOf(el.getAttributeValue(
"name")));
44 Element el =
new Element(
"day-of-month-constraint");
46 for(Integer i :
this) {
47 Element e =
new Element(
"day");
48 e.setAttribute(
"name", i +
"");
54 for(
int i = 1; i < 32; i++) {
63 if(dm !=
null && contains(dm)) {
64 refresh = !dm.equals(lastCheck);
77 Calendar c = Calendar.getInstance();
79 return c.get(Calendar.DAY_OF_MONTH);
void readXML(Element root)
Integer getDayOfMonth(Date date)
boolean isValid(Date date)
void writeXML(Element root)
DayOfMonthConstraint setAll()