Mercurial > hg > ismi-richfaces
comparison src/main/java/de/mpiwg/itgroup/ismi/entry/utils/PrivacityUtils.java @ 194:c7fec83ab69a
fix bugs with make-public buttons in entity details form. Closes #152.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 07 Dec 2018 15:47:06 +0100 |
parents | 8aff920ec7c0 |
children |
comparison
equal
deleted
inserted
replaced
193:76d2dda8d4de | 194:c7fec83ab69a |
---|---|
79 isPublic = entity.getIsPublic(); | 79 isPublic = entity.getIsPublic(); |
80 } | 80 } |
81 | 81 |
82 // change source relations | 82 // change source relations |
83 for (Relation rel : entity.getSourceRelations()) { | 83 for (Relation rel : entity.getSourceRelations()) { |
84 if (!exceptedTypes.contains(rel.getTargetObjectClass())) { | 84 if (exceptedTypes != null && exceptedTypes.contains(rel.getTargetObjectClass())) { |
85 continue; | |
86 } else { | |
85 Long entId = rel.getTargetId(); | 87 Long entId = rel.getTargetId(); |
86 if (alreadyModified.containsKey(entId)) { | 88 if (alreadyModified.containsKey(entId)) { |
87 continue; | 89 continue; |
88 } | 90 } |
89 Entity ent = wrapper.getEntityById(entId); | 91 Entity ent = wrapper.getEntityById(entId); |
91 modified.put(entId, ent); | 93 modified.put(entId, ent); |
92 } | 94 } |
93 } | 95 } |
94 // change target relations | 96 // change target relations |
95 for (Relation rel : entity.getTargetRelations()) { | 97 for (Relation rel : entity.getTargetRelations()) { |
96 if (!exceptedTypes.contains(rel.getSourceObjectClass())) { | 98 if (exceptedTypes != null && exceptedTypes.contains(rel.getSourceObjectClass())) { |
99 continue; | |
100 } else { | |
97 Long entId = rel.getSourceId(); | 101 Long entId = rel.getSourceId(); |
98 if (alreadyModified.containsKey(entId)) { | 102 if (alreadyModified.containsKey(entId)) { |
99 continue; | 103 continue; |
100 } | 104 } |
101 Entity ent = wrapper.getEntityById(entId); | 105 Entity ent = wrapper.getEntityById(entId); |