use of org.bimserver.database.actions.GetTopLevelProjectByNameDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getTopLevelProjectByName.
@Override
public SProject getTopLevelProjectByName(String name) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
GetTopLevelProjectByNameDatabaseAction action = new GetTopLevelProjectByNameDatabaseAction(session, getInternalAccessMethod(), name, getAuthorization());
return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(action));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations