Hello,
The hasRelationManager method of Cloud is annoying me a bit. It
generates a lot of log.error messages, because a RelationManager does
not exist. This is just the reason why this method is there in the first
place. I like to change this amd a very easy way is to use the
TypeRel.contains method. There is only one small difference in the
current functionality and the contains method.
The current method allows that the source and destination nodemanager
are switched.
To make it more clear.
I have defined an typerel from site to navchannel with role navrel.
Cloud.hasRelationManager()
site, navchannel, navrel = true
navchannel, site, navrel = true
Typerel.contains
site, navchannel, navrel = true
navchannel, site, navrel = false
MMbase itself does not use this method anywhere in the code (except for
the new 1.8 HasRelationManagerTag).
The hasRelationManager method is avaliable since 1.6 and changing this
behaviour might break some mmbase applications. Should I just change this?
Another option I have is to provide the same functionality, but then I
need another method to check that the relation is only from site to
navchannel. I could create another method with an extra parameter
searchdir. I can then use it with Searchdir.DESTIONATION. The old method
could then use the new method with Searchdir.BOTH.
Which one do you prefer?
Nico
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers