Cleaned code
This commit is contained in:
parent
5676d17c58
commit
eb240c751a
|
@ -182,25 +182,18 @@ public class DatabaseEnvironment {
|
||||||
try {
|
try {
|
||||||
boolean created = initGraphDB();
|
boolean created = initGraphDB();
|
||||||
|
|
||||||
AdminSecurityContext adminSecurityContext = AdminSecurityContext.getInstance();
|
|
||||||
|
|
||||||
QueryTemplatesSecurityContext queryTemplatesSecurityContext = QueryTemplatesSecurityContext.getInstance();
|
|
||||||
TypeSecurityContext typeSecurityContext = TypeSecurityContext.getInstance();
|
|
||||||
ContextSecurityContext contextSecurityContext = ContextSecurityContext.getInstance();
|
|
||||||
|
|
||||||
if(created) {
|
if(created) {
|
||||||
ODatabasePool pool = new ODatabasePool(DatabaseEnvironment.DB_URI, CHANGED_ADMIN_USERNAME,
|
ODatabasePool pool = new ODatabasePool(DatabaseEnvironment.DB_URI, CHANGED_ADMIN_USERNAME,
|
||||||
CHANGED_ADMIN_PASSWORD);
|
CHANGED_ADMIN_PASSWORD);
|
||||||
ODatabaseDocument oDatabaseDocument = pool.acquire();
|
ODatabaseDocument oDatabaseDocument = pool.acquire();
|
||||||
adminSecurityContext.create(oDatabaseDocument);
|
AdminSecurityContext.getInstance().create(oDatabaseDocument);
|
||||||
oDatabaseDocument.commit();
|
oDatabaseDocument.commit();
|
||||||
oDatabaseDocument.close();
|
oDatabaseDocument.close();
|
||||||
pool.close();
|
pool.close();
|
||||||
|
|
||||||
queryTemplatesSecurityContext.create();
|
QueryTemplatesSecurityContext.getInstance().create();
|
||||||
typeSecurityContext.create();
|
TypeSecurityContext.getInstance().create();
|
||||||
contextSecurityContext.create();
|
ContextSecurityContext.getInstance().create();
|
||||||
|
|
||||||
|
|
||||||
List<Class<? extends Element>> definitionToBeCreated = new ArrayList<>();
|
List<Class<? extends Element>> definitionToBeCreated = new ArrayList<>();
|
||||||
definitionToBeCreated.add(PropertyElement.class);
|
definitionToBeCreated.add(PropertyElement.class);
|
||||||
|
|
Loading…
Reference in New Issue