summaryrefslogtreecommitdiffstats
path: root/base/common/functional/src
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-07-19 01:51:50 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-07-30 11:21:45 -0500
commitc4636a5b56bd3e0f18fb3afd0b930729d58ce1f6 (patch)
tree57452b5a630dc4c3deda724f992180e7ba4cafeb /base/common/functional/src
parent70681bc83ccc25639da1b87940661b2649044629 (diff)
downloadpki-c4636a5b56bd3e0f18fb3afd0b930729d58ce1f6.tar.gz
pki-c4636a5b56bd3e0f18fb3afd0b930729d58ce1f6.tar.xz
pki-c4636a5b56bd3e0f18fb3afd0b930729d58ce1f6.zip
Added ClientConfig.
A new ClientConfig class has been added to encapsulate client configuration parameters. These parameters include server URI, certificate database, certificate nickname, and password. Ticket #107
Diffstat (limited to 'base/common/functional/src')
-rw-r--r--base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java b/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
index 4ac322d63..67b67fca0 100644
--- a/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
+++ b/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
@@ -56,6 +56,7 @@ import org.mozilla.jss.pkix.primitive.Name;
import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo;
import org.mozilla.jss.util.Password;
+import com.netscape.cms.client.cli.ClientConfig;
import com.netscape.cms.servlet.csadmin.ConfigurationRESTClient;
import com.netscape.cms.servlet.csadmin.model.CertData;
import com.netscape.cms.servlet.csadmin.model.ConfigurationData;
@@ -183,10 +184,12 @@ public class ConfigurationTest {
System.out.println("Exception in logging into token:" + e.toString());
}
- String baseUri = protocol + "://" + host + ":" + port + "/" + cstype + "/pki";
ConfigurationRESTClient client = null;
try {
- client = new ConfigurationRESTClient(baseUri, null);
+ ClientConfig config = new ClientConfig();
+ config.setServerURI(protocol + "://" + host + ":" + port + "/" + cstype);
+
+ client = new ConfigurationRESTClient(config);
} catch (URISyntaxException e1) {
e1.printStackTrace();
System.exit(1);