Added utility function for database context management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@166936 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-04-12 12:46:24 +00:00
parent 5ae54a6738
commit 629d14ad96
1 changed files with 7 additions and 1 deletions

View File

@ -179,9 +179,15 @@ public class ContextUtility {
return securityContext; return securityContext;
} }
protected UUID getContextUUIDFromFullName(String fullName) throws ResourceRegistryException {
Vertex contextVertex = getContextVertexByFullName(fullName);
return Utility.getUUID(contextVertex);
}
private Vertex getContextVertexByFullName(String fullName) throws ResourceRegistryException { private Vertex getContextVertexByFullName(String fullName) throws ResourceRegistryException {
logger.trace("Going to get {} {} from full name '{}'", Context.NAME, Vertex.class.getSimpleName(), fullName); logger.trace("Going to get {} {} with full name '{}'", Context.NAME, Vertex.class.getSimpleName(), fullName);
ScopeBean scopeBean = new ScopeBean(fullName); ScopeBean scopeBean = new ScopeBean(fullName);
String name = scopeBean.name(); String name = scopeBean.name();