schemaResources.add("jpdl-4.0.xsd");
setSchemaResources(schemaResources);
}
protected void parseBindings() {
Bindings bindings = new Bindings();
setBindings(bindings);
for (String activityResource: DEFAULT_ACTIVITIES_RESOURCES) {
Enumeration<URL> resourceUrls = ReflectUtil.getResources(null, activityResource);
if (resourceUrls.hasMoreElements()) {
while (resourceUrls.hasMoreElements()) {
URL resourceUrl = resourceUrls.nextElement();
log.trace("loading jpdl activities from resource: "+resourceUrl);
List<JpdlBinding> activityBindings = (List<JpdlBinding>) bindingsParser.createParse()
.setUrl(resourceUrl)
.execute()
.checkErrors("jpdl activities from "+resourceUrl.toString())
.getDocumentObject();
for (JpdlBinding binding: activityBindings) {
binding.setCategory(CATEGORY_ACTIVITY);
bindings.addBinding(binding);
}
}
} else {
log.trace("skipping unavailable jpdl activities resource: "+activityResource);
}
}
for (String eventListenerResource: DEFAULT_EVENTLISTENERS_RESOURCES) {
Enumeration<URL> resourceUrls = ReflectUtil.getResources(null, eventListenerResource);
if (resourceUrls.hasMoreElements()) {
while (resourceUrls.hasMoreElements()) {
URL resourceUrl = resourceUrls.nextElement();
log.trace("loading jpdl eventlisteners from resource: "+resourceUrl);
List<JpdlBinding> activityBindings = (List<JpdlBinding>) bindingsParser.createParse()
.setUrl(resourceUrl)
.execute()
.checkErrors("jpdl eventlisteners from "+resourceUrl.toString())
.getDocumentObject();
for (JpdlBinding binding: activityBindings) {
binding.setCategory(CATEGORY_EVENT_LISTENER);
bindings.addBinding(binding);
}
}
} else {
log.trace("skipping unavailable jpdl eventlistener resource: "+eventListenerResource);
}