idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
[idok-commit] idok commit r282 - trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client
Chronological Thread
- From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r282 - trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client
- Date: Fri, 17 Oct 2008 12:18:10 +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: geus
Date: Fri Oct 17 12:18:10 2008
New Revision: 282
Log:
Added some comments and minor cleanup
Modified:
trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client/IdokSearchUtil.java
Modified:
trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client/IdokSearchUtil.java
==============================================================================
--- trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client/IdokSearchUtil.java
(original)
+++ trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client/IdokSearchUtil.java
Fri Oct 17 12:18:10 2008
@@ -22,6 +22,14 @@
/**
* This class provides a set of utility methods for accessing the iDok ReST
* search service.
+ *
+ * For production deployment, set USE_XHR to false and set REST_BASE_URL to
+ * https://HOST/api/v1/...
+ *
+ * For debugging under Linux, set USE_XHR to true and REST_BASE_URL to
+ * http://HOST:8183/v1/...
+ *
+ * For debugging under Windows, set USE_XHR to false
*/
public class IdokSearchUtil {
@@ -31,6 +39,11 @@
static final String REST_BASE_URL =
"https://dms02.psi.ch/api/v1/search/";
// static final String REST_BASE_URL =
// "http://dms02.psi.ch:8183/v1/search/";
+
+ /**
+ * Base URL of iDok documents hosted by Subversion
+ */
+ static final String SVN_BASE_URL = "https://dms02.psi.ch/";
/**
* If true, use XMLHttpRequest, else use JSONP for accessing iDok ReST
@@ -58,7 +71,7 @@
* @return the URL to the iDok document referenced by the search result
item
*/
public static String getDocumentURL(SearchResultItem hit) {
- return "https://dms02.psi.ch/" + hit.getRepo() + "/!svn/ver/"
+ return SVN_BASE_URL + hit.getRepo() + "/!svn/ver/"
+ hit.getRev() + "/" + hit.getId();
}
- [idok-commit] idok commit r282 - trunk/sites/psi/java/ch/psi/idok/gwt/twiki/client, AFS account Roman Geus, 10/17/2008
Archive powered by MHonArc 2.6.19.