idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "Apache" <apache AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r157 - trunk/java/ch/idok/qtgui
- Date: Wed, 30 Jul 2008 17:15:01 +0200
- List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
- List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>
Author: huebner AT PSI.CH
Date: Wed Jul 30 17:15:01 2008
New Revision: 157
Log:
Added Feature #IDO-76: Show automatically all repositories with read access
Modified:
trunk/java/ch/idok/qtgui/RepositoryController.java
Modified: trunk/java/ch/idok/qtgui/RepositoryController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/RepositoryController.java (original)
+++ trunk/java/ch/idok/qtgui/RepositoryController.java Wed Jul 30 17:15:01
2008
@@ -22,6 +22,9 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
import ch.idok.common.errorhandling.DmsException;
import ch.idok.common.impl.repository.svn.SvnRepositoryManager;
@@ -33,7 +36,6 @@
import com.trolltech.qt.QSignalEmitter;
import com.trolltech.qt.core.QPoint;
import com.trolltech.qt.core.Qt;
-import com.trolltech.qt.gui.QAction;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QColor;
import com.trolltech.qt.gui.QDialog;
@@ -254,6 +256,35 @@
i++;
o = DmsGui.Settings.value("/repo" + i);
}
+
+ ui_.urlComboBox.insertItem(i,
"----------------------------------------------------------------------");
+ i++;
+
+ try {
+ String[] repoList =
ServiceProvider.getInstance().getAdminService()
+ .queryTask(GuiClientHandler.getInstance().getCredentials(),
+ "read");
+ List<String> rList = new ArrayList<String>();
+ String orbName =
System.getProperties().getProperty("ORBInitRef.NameService");
+ String location = orbName.split(":")[2];
+
+ for (int j = 0; j < repoList.length; j++) {
+ if (repoList[j].contains("/")) {
+ rList.add(repoList[j]);
+ }
+ }
+ Collections.sort(rList);
+ for (Iterator iterator = rList.iterator(); iterator.hasNext();) {
+ String entry = (String) iterator.next();
+ ui_.urlComboBox.insertItem(i, "https://"+location+"/"+entry);
+ i++;
+ }
+
+ } catch (DmsException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
// make last used repo the currently selected repo
o = DmsGui.Settings.value("lastUsedRepo");
if (o != null) {
- [idok-commit] idok commit r157 - trunk/java/ch/idok/qtgui, Apache, 07/30/2008
Archive powered by MHonArc 2.6.19.