Committing missing change
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@158405 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6155b24dbe
commit
7fe7e641f4
|
@ -30,14 +30,12 @@ import com.tinkerpop.blueprints.Element;
|
|||
import com.tinkerpop.blueprints.Vertex;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientBaseGraph;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientElement;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;
|
||||
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
|
||||
import com.tinkerpop.blueprints.util.io.graphson.GraphSONMode;
|
||||
import com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
public class Utility {
|
||||
|
||||
|
@ -92,17 +90,11 @@ public class Utility {
|
|||
|
||||
public static <El extends Element> El getElementByUUIDAsAdmin(String elementType, UUID uuid,
|
||||
Class<? extends El> clz) throws ERNotFoundException, ResourceRegistryException {
|
||||
|
||||
OrientGraphFactory orientGraphFactory = SecurityContextMapper
|
||||
.getSecurityContextFactory(SecurityContextMapper.ADMIN_SECURITY_CONTEXT_UUID, PermissionMode.READER);
|
||||
|
||||
OrientGraphNoTx orientGraphNoTx = null;
|
||||
try {
|
||||
|
||||
orientGraphNoTx = orientGraphFactory.getNoTx();
|
||||
|
||||
orientGraphNoTx = SecurityContextMapper.getSecurityContextGraphNoTx(
|
||||
SecurityContextMapper.ADMIN_SECURITY_CONTEXT_UUID, PermissionMode.READER);
|
||||
return Utility.getElementByUUID(orientGraphNoTx, elementType, uuid, clz);
|
||||
|
||||
} finally {
|
||||
if (orientGraphNoTx != null) {
|
||||
orientGraphNoTx.shutdown();
|
||||
|
|
Loading…
Reference in New Issue