From 4300459bff057ba50093f735ee9289868e258215 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Mon, 8 Oct 2012 16:52:53 -0400 Subject: Added PKIConnection. The code in PKIClient has been refactored into PKIConnection such that a single connection object can be used by several REST clients. The PKIClient will remain the base class for all REST clients. Ticket #357 --- base/common/src/com/netscape/certsrv/ca/CAClient.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'base/common/src/com/netscape/certsrv/ca') diff --git a/base/common/src/com/netscape/certsrv/ca/CAClient.java b/base/common/src/com/netscape/certsrv/ca/CAClient.java index 62e7a2438..2c026b799 100644 --- a/base/common/src/com/netscape/certsrv/ca/CAClient.java +++ b/base/common/src/com/netscape/certsrv/ca/CAClient.java @@ -31,6 +31,7 @@ import com.netscape.certsrv.cert.CertReviewResponse; import com.netscape.certsrv.cert.CertSearchRequest; import com.netscape.certsrv.client.ClientConfig; import com.netscape.certsrv.client.PKIClient; +import com.netscape.certsrv.client.PKIConnection; import com.netscape.certsrv.dbs.certdb.CertId; import com.netscape.certsrv.profile.ProfileData; import com.netscape.certsrv.profile.ProfileDataInfos; @@ -43,9 +44,17 @@ public class CAClient extends PKIClient { private CertRequestResource certRequestClient; private ProfileResource profileClient; + public CAClient(PKIConnection connection) throws URISyntaxException { + super(connection); + init(); + } + public CAClient(ClientConfig config) throws URISyntaxException { super(config); + init(); + } + public void init() throws URISyntaxException { certRequestClient = createProxy(CertRequestResource.class); certClient = createProxy(CertResource.class); profileClient = createProxy(ProfileResource.class); -- cgit