frankframework / frank-doc

Frank!Doc
https://frankdoc.frankframework.org
Apache License 2.0
4 stars 5 forks source link

Not all frank elements are in the Frank!Doc #45

Open nielsm5 opened 3 years ago

nielsm5 commented 3 years ago

Right now only elements that are a child of a root element are included in the Frank!Doc. Because of this the framework now contains lots of dummy methods such as:

// Dummy setter to allow JmsRealms being added to Configurations via FrankDoc.xsd
public void registerJmsRealm(JmsRealm realm) {
    JmsRealmFactory.getInstance().registerJmsRealm(realm);
}

// Dummy method to include monitoring in the Frank!Doc.
public void registerMonitoring(MonitorManager factory) {
}

In order to avoid these methods I propose that we change the required rules in the digester-rules.xml from relative to absolute paths.

From: <rule pattern="*/monitoring" registerMethod="registerMonitoring" factory="nl.nn.adapterframework.monitoring.MonitoringFactory"/> To: <rule pattern="configuration/monitoring" factory="nl.nn.adapterframework.monitoring.MonitoringFactory"/>

Note the absolute path/pattern, enforcing this element to be a child of Configuration, even though there is no setter available for this element.

nielsm5 commented 3 years ago

See https://github.com/ibissource/iaf/pull/2471 where the above change has been made.

mhdirkse commented 3 years ago

The Frank!Doc needs to know a Java class or interface for the child. If it is not the argument of a set/add/register method, how should the Frank!Doc know it?

nielsm5 commented 3 years ago

I've updated the abovementioned pull request. I hope the changes made in the digester-rules.xml file will suffice!