use of org.bimserver.database.actions.GetAllReadableProjectsDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getAllReadableProjects.
@Override
public List<SProject> getAllReadableProjects() throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Set<Project>> action = new GetAllReadableProjectsDatabaseAction(session, getInternalAccessMethod(), getAuthorization());
return getBimServer().getSConverter().convertToSListProject(session.executeAndCommitAction(action));
} catch (Exception e) {
handleException(e);
return null;
} finally {
session.close();
}
}
Aggregations