use of org.bimserver.database.actions.DeleteServiceDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method deleteService.
@Override
public void deleteService(Long oid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Void> action = new DeleteServiceDatabaseAction(session, getInternalAccessMethod(), oid);
session.executeAndCommitAction(action);
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations