use of org.bimserver.database.actions.AddModelCheckerToProjectDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method addModelCheckerToProject.
@Override
public void addModelCheckerToProject(Long poid, Long modelCheckerOid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
ModelCheckerInstance modelChecker = session.get(modelCheckerOid, OldQuery.getDefault());
AddModelCheckerToProjectDatabaseAction action = new AddModelCheckerToProjectDatabaseAction(session, getInternalAccessMethod(), poid, modelChecker, getAuthorization());
session.executeAndCommitAction(action);
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations