Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r195 - branches/rest/java/ch/idok/service/client/rest

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r195 - branches/rest/java/ch/idok/service/client/rest


Chronological Thread 
  • From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r195 - branches/rest/java/ch/idok/service/client/rest
  • Date: Tue, 26 Aug 2008 18:30:39 +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: Tue Aug 26 18:30:39 2008
New Revision: 195

Log:
Replaced hardcoded server URI by system property in REST client Provider

Modified:
branches/rest/java/ch/idok/service/client/rest/RestClientProvider.java

Modified:
branches/rest/java/ch/idok/service/client/rest/RestClientProvider.java
==============================================================================
--- branches/rest/java/ch/idok/service/client/rest/RestClientProvider.java
(original)
+++ branches/rest/java/ch/idok/service/client/rest/RestClientProvider.java
Tue Aug 26 18:30:39 2008
@@ -4,6 +4,7 @@

import ch.idok.common.config.Setup;
import ch.idok.common.errorhandling.DmsException;
+import ch.idok.common.errorhandling.ErrorType;
import ch.idok.service.client.search.rest.RestSearchService;
import ch.idok.service.common.Provider;
import ch.idok.service.common.admin.AdminService;
@@ -11,16 +12,23 @@
import ch.idok.service.common.search.SearchService;

public class RestClientProvider implements Provider {
-
- private Logger logger;
-
- private String baseUri = "http://mpc1127.psi.ch:8183/v1";;
-
+
+ private final Logger logger = Setup.getInstance().getLogger(
+ "service.client.rest");
+
+ private String baseUri;
+
/**
* @see ch.idok.service.common.Provider#init(java.lang.String[])
*/
public void init(String[] args) throws DmsException {
- logger = Setup.getInstance().getLogger("service.client.rest");

+ baseUri =
System.getProperty("ch.idok.service.client.rest.serverUri");
+ if (baseUri == null)
+ throw new DmsException(
+ ErrorType.INTERNAL,
+ null,
+ "Property \"ch.idok.service.client.rest.serverUri\" not
set",
+ "");
}

/**
@@ -33,7 +41,7 @@
/**
* @see ch.idok.service.common.Provider#getCLIFactoryService()
*/
- public CLIFactoryService getCLIFactoryService() throws DmsException {

+ public CLIFactoryService getCLIFactoryService() throws DmsException {
throw new RuntimeException("Not yet implemented");
}

@@ -56,6 +64,6 @@
*/
public Logger getLogger() {
return logger;
- }
+ }

}



  • [idok-commit] idok commit r195 - branches/rest/java/ch/idok/service/client/rest, AFS account Roman Geus, 08/26/2008

Archive powered by MHonArc 2.6.19.

Top of Page