use of org.bimserver.database.actions.AddModelCheckerDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method addModelChecker.
@Override
public Long addModelChecker(SModelCheckerInstance modelCheckerInstance) throws UserException, ServerException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.POSSIBLY_WRITE);
try {
ModelCheckerInstance convert = getBimServer().getSConverter().convertFromSObject(modelCheckerInstance, session);
return session.executeAndCommitAction(new AddModelCheckerDatabaseAction(session, getInternalAccessMethod(), convert));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations