Search in sources :

Example 1 with Job

use of nl.nn.adapterframework.scheduler.job.Job in project iaf by ibissource.

the class DigesterRuleBase method begin.

@Override
public final void begin(String uri, String elementName, Attributes attributes) throws Exception {
    Object top = getBean();
    Map<String, String> map = copyAttrsToMap(attributes);
    if (top instanceof INamedObject) {
        // We must set the name first, to improve logging and configuration warnings
        String name = map.remove("name");
        if (StringUtils.isNotEmpty(name)) {
            BeanUtils.setProperty(top, "name", name);
        }
    }
    // They are however still required for the JobFactory to determine the correct job class, in order to avoid ConfigurationWarnings.
    if (top instanceof IJob && !(top instanceof Job)) {
        map.remove("function");
    }
    handleBean();
    for (Entry<String, String> entry : map.entrySet()) {
        String attribute = entry.getKey();
        if (log.isTraceEnabled()) {
            log.trace("checking attribute [" + attribute + "] on bean [" + getObjectName() + "]");
        }
        handleAttribute(attribute, entry.getValue(), map);
    }
}
Also used : INamedObject(nl.nn.adapterframework.core.INamedObject) IJob(nl.nn.adapterframework.scheduler.job.IJob) INamedObject(nl.nn.adapterframework.core.INamedObject) IJob(nl.nn.adapterframework.scheduler.job.IJob) Job(nl.nn.adapterframework.scheduler.job.Job)

Aggregations

INamedObject (nl.nn.adapterframework.core.INamedObject)1 IJob (nl.nn.adapterframework.scheduler.job.IJob)1 Job (nl.nn.adapterframework.scheduler.job.Job)1