Added useful overloaded method
This commit is contained in:
parent
e0f0985ef6
commit
ba01253865
|
@ -159,6 +159,11 @@ public class ContextCache {
|
||||||
return uuidToContextFullName.get(uuid);
|
return uuidToContextFullName.get(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized String getContextFullNameByUUID(String uuid) throws ResourceRegistryException {
|
||||||
|
refreshContextsIfNeeded();
|
||||||
|
return uuidToContextFullName.get(UUID.fromString(uuid));
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized UUID getUUIDByFullName(String contextFullName) throws ResourceRegistryException {
|
public synchronized UUID getUUIDByFullName(String contextFullName) throws ResourceRegistryException {
|
||||||
refreshContextsIfNeeded();
|
refreshContextsIfNeeded();
|
||||||
return contextFullNameToUUID.get(contextFullName);
|
return contextFullNameToUUID.get(contextFullName);
|
||||||
|
@ -169,6 +174,11 @@ public class ContextCache {
|
||||||
return uuidToContext.get(uuid);
|
return uuidToContext.get(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized Context getContextByUUID(String uuid) throws ResourceRegistryException {
|
||||||
|
refreshContextsIfNeeded();
|
||||||
|
return uuidToContext.get(UUID.fromString(uuid));
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized Context getContextByFullName(String contextFullName) throws ResourceRegistryException {
|
public synchronized Context getContextByFullName(String contextFullName) throws ResourceRegistryException {
|
||||||
UUID uuid = getUUIDByFullName(contextFullName);
|
UUID uuid = getUUIDByFullName(contextFullName);
|
||||||
return uuidToContext.get(uuid);
|
return uuidToContext.get(uuid);
|
||||||
|
|
Loading…
Reference in New Issue