Fixed code to comply with uuid property rename to id
This commit is contained in:
parent
a60aa315fe
commit
71a9acae34
|
@ -110,23 +110,23 @@ public class ContextCache {
|
|||
this.contexts = new ArrayList<>();
|
||||
|
||||
for(Context c : contexts) {
|
||||
UUID uuid = c.getUUID();
|
||||
UUID uuid = c.getID();
|
||||
Context context = new ContextImpl(c.getName());
|
||||
context.setMetadata(c.getMetadata());
|
||||
context.setUUID(uuid);
|
||||
context.setID(uuid);
|
||||
this.contexts.add(context);
|
||||
this.uuidToContext.put(uuid, context);
|
||||
}
|
||||
|
||||
for(Context c : contexts) {
|
||||
UUID uuid = c.getUUID();
|
||||
UUID uuid = c.getID();
|
||||
Context context = this.uuidToContext.get(uuid);
|
||||
if(c.getParent()!=null) {
|
||||
IsParentOf ipo = c.getParent();
|
||||
UUID parentUUID = ipo.getSource().getUUID();
|
||||
UUID parentUUID = ipo.getSource().getID();
|
||||
Context parent = this.uuidToContext.get(parentUUID);
|
||||
IsParentOf isParentOf = new IsParentOfImpl(parent, context);
|
||||
isParentOf.setUUID(parentUUID);
|
||||
isParentOf.setID(parentUUID);
|
||||
isParentOf.setMetadata(ipo.getMetadata());
|
||||
parent.addChild(isParentOf);
|
||||
context.setParent(isParentOf);
|
||||
|
@ -136,7 +136,7 @@ public class ContextCache {
|
|||
|
||||
|
||||
for(Context context : contexts) {
|
||||
UUID uuid = context.getUUID();
|
||||
UUID uuid = context.getID();
|
||||
String fullName = getContextFullName(context);
|
||||
this.uuidToContextFullName.put(uuid, fullName);
|
||||
this.contextFullNameToUUID.put(fullName, uuid);
|
||||
|
@ -149,7 +149,7 @@ public class ContextCache {
|
|||
IsParentOf ipo = context.getParent();
|
||||
if(ipo!=null) {
|
||||
Context c = ipo.getSource();
|
||||
c = uuidToContext.get(c.getUUID());
|
||||
c = uuidToContext.get(c.getID());
|
||||
String parentFullName = getContextFullName(c);
|
||||
stringBuilder.append(parentFullName);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ContextUtility {
|
|||
try {
|
||||
Map<UUID, String> uuidToContextFullNameAssociation = contextCache.getUUIDToContextFullNameAssociation();
|
||||
if(!uuidToContextFullNameAssociation.keySet().containsAll(uuids)) {
|
||||
logger.debug("{} does not contain all the contexts identified by the following UUID list. Trying to invalidate the cache", ContextCache.class.getSimpleName(), uuids);
|
||||
logger.debug("{} does not contain all the contexts identified by the following UUID list {}. Trying to invalidate the cache", ContextCache.class.getSimpleName(), uuids);
|
||||
contextCache.cleanCache();
|
||||
uuidToContextFullNameAssociation = contextCache.getUUIDToContextFullNameAssociation();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue