logger.debug("Element returned: ");
logger.debug(" - " + configElement.getName());
logger.debug(" - " + scheduleName);
Attribute aImmediate = configElement.getAttribute("isImmediate");
if (aImmediate != null) {
setImmediate(new Boolean(aImmediate.getValue()).booleanValue());
}
else {
// Use default values...
aImmediate = getDefaultParms().getAttribute("isImmediate");
if (aImmediate != null) {
setImmediate(new Boolean(aImmediate.getValue()).booleanValue());
}
else {
setImmediate(false);
}
}
// look for default Runtimes associated to all Schedules. This will
// be overridden if the Schedule has its owne Runtime associated to it.
Element eDefaultRuntimes = getDefaultParms().getChild(RUN_TIME);
if (eDefaultRuntimes != null) {
addRuntimes(eDefaultRuntimes);
}
// look for default MailService to be used for all Scheduleds. This will
// be overridden if the Schedule has its own MailService associated to it.
Element eDefaultMailService = getDefaultParms().getChild(MAIL_SERVICE_CONFIG);
if (eDefaultMailService != null) {
MailServiceConfig mcf = new MailServiceConfig();
mcf.init(eDefaultMailService);
try {
setMailService(new MailService(mcf));
}
catch (Exception e) {
logger.fatal("Error configuring MailService. Exception: " + e.getMessage(), e);
throw new EnterpriseConfigurationObjectException(e.getMessage(), e);
}
}
// Add all attributes as 'Properties'
try {
java.util.List attrs = configElement.getAttributes();
for (int i=0; i<attrs.size(); i++) {
Attribute attr = (Attribute)attrs.get(i);
String key = attr.getName();
String value = attr.getValue();
logger.debug("ScheduleConfig, Adding " + key + " - " + value);
addProperty(key, value);
}
// Now the Elements.