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