Fixed log
This commit is contained in:
parent
28ea920a05
commit
aeba8ba06a
|
@ -14,7 +14,6 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegis
|
|||
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.base.ElementManagementUtility;
|
||||
import org.gcube.informationsystem.resourceregistry.environments.Environment;
|
||||
import org.gcube.informationsystem.resourceregistry.environments.Environment.PermissionMode;
|
||||
import org.gcube.informationsystem.resourceregistry.environments.administration.AdminEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.environments.instances.InstanceEnvironment;
|
||||
|
@ -56,7 +55,7 @@ public class ContextUtility {
|
|||
return SecretManagerProvider.instance.get().getContext();
|
||||
}
|
||||
|
||||
public static Environment getCurrentRequestEnvironment() throws ResourceRegistryException {
|
||||
public static InstanceEnvironment getCurrentRequestEnvironment() throws ResourceRegistryException {
|
||||
String fullName = getCurrentContextFullName();
|
||||
if(fullName == null) {
|
||||
throw new ContextException("Null Token and Scope. Please set your token first.");
|
||||
|
@ -83,7 +82,7 @@ public class ContextUtility {
|
|||
try {
|
||||
InstanceEnvironment securityContext = null;
|
||||
|
||||
logger.trace("Trying to get {} for {}", Environment.class.getSimpleName(), fullName);
|
||||
logger.trace("Trying to get {} for {}", InstanceEnvironment.class.getSimpleName(), fullName);
|
||||
UUID uuid = ServerContextCache.getInstance().getUUIDByFullName(fullName);
|
||||
|
||||
if(uuid != null) {
|
||||
|
@ -91,7 +90,7 @@ public class ContextUtility {
|
|||
}
|
||||
|
||||
if(securityContext==null) {
|
||||
logger.trace("{} for {} is not in cache. Going to get it", Environment.class.getSimpleName(),
|
||||
logger.trace("{} for {} is not in cache. Going to get it", InstanceEnvironment.class.getSimpleName(),
|
||||
fullName);
|
||||
oDatabaseDocument = AdminEnvironment.getInstance().getDatabaseDocument(PermissionMode.READER);
|
||||
|
||||
|
|
Loading…
Reference in New Issue