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