Commit 4664d690 authored by Jörg Richter's avatar Jörg Richter

API: fix getTopicmapTopics() for implicitly hidden assocs (#188)

parent 365addf4
Pipeline #5866 passed with stages
in 3 minutes and 4 seconds
......@@ -141,12 +141,9 @@ public class TopicmapsPlugin extends PluginActivator implements TopicmapsService
public List<RelatedTopic> getTopicmapTopics(@PathParam("id") long objectId) {
try {
List<RelatedTopic> topicmapTopics = new ArrayList();
DMXObject object = dmx.getObject(objectId);
boolean isAssoc = object instanceof Association;
for (RelatedTopic topic : object.getRelatedTopics((String) null, null, ROLE_TYPE_TOPICMAP,
"dmx.topicmaps.topicmap")) {
// FIXME: meanwhile assocs have visibility as well
if (isAssoc || visibility(topic.getRelatingAssociation())) {
for (RelatedTopic topic : dmx.getObject(objectId).getRelatedTopics(TOPICMAP_CONTEXT, ROLE_TYPE_CONTENT,
ROLE_TYPE_TOPICMAP, "dmx.topicmaps.topicmap")) {
if (visibility(topic.getRelatingAssociation())) {
topicmapTopics.add(topic);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment