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