Fixing server context cache
This commit is contained in:
parent
20914f3f06
commit
804e2b2343
|
@ -185,27 +185,28 @@ public class ServerContextCache extends ContextCache {
|
|||
|
||||
if(c.getParent()!=null) {
|
||||
IsParentOf ipo = c.getParent();
|
||||
UUID parentUUID = ipo.getSource().getID();
|
||||
UUID isParentOfParentUUID = ipo.getID();
|
||||
UUID contextParentUUID = ipo.getSource().getID();
|
||||
|
||||
Context parentWithMeta = this.uuidToContext.get(parentUUID);
|
||||
Context parentWithMeta = this.uuidToContext.get(contextParentUUID);
|
||||
IsParentOf isParentOfWithMeta = new IsParentOfImpl(parentWithMeta, contextMeta);
|
||||
isParentOfWithMeta.setID(parentUUID);
|
||||
isParentOfWithMeta.setID(isParentOfParentUUID);
|
||||
isParentOfWithMeta.setMetadata(ipo.getMetadata());
|
||||
parentWithMeta.addChild(isParentOfWithMeta);
|
||||
contextMeta.setParent(isParentOfWithMeta);
|
||||
|
||||
Context parentWithMetaPrivacy = this.uuidToContextMetaPrivacy.get(parentUUID);
|
||||
Context parentWithMetaPrivacy = this.uuidToContextMetaPrivacy.get(contextParentUUID);
|
||||
IsParentOf isParentOfMetaPrivacy = new IsParentOfImpl(parentWithMetaPrivacy, contextMetaPrivacy);
|
||||
isParentOfMetaPrivacy.setID(parentUUID);
|
||||
isParentOfMetaPrivacy.setID(isParentOfParentUUID);
|
||||
Metadata metadataWithPrivacy = getMetadataForPrivacy(objectMapper, ipo.getMetadata());
|
||||
isParentOfMetaPrivacy.setMetadata(metadataWithPrivacy);
|
||||
parentWithMetaPrivacy.addChild(isParentOfMetaPrivacy);
|
||||
contextMetaPrivacy.setParent(isParentOfMetaPrivacy);
|
||||
|
||||
Context parentNoMeta = this.uuidToContextNoMeta.get(parentUUID);
|
||||
Context parentNoMeta = this.uuidToContextNoMeta.get(contextParentUUID);
|
||||
IsParentOf isParentOfNoMeta = new IsParentOfImpl(parentNoMeta, contextNoMeta);
|
||||
isParentOfNoMeta.setMetadata(null);
|
||||
isParentOfNoMeta.setID(parentUUID);
|
||||
isParentOfNoMeta.setID(isParentOfParentUUID);
|
||||
parentNoMeta.addChild(isParentOfNoMeta);
|
||||
contextNoMeta.setParent(isParentOfNoMeta);
|
||||
|
||||
|
|
Loading…
Reference in New Issue