summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-06-15 04:00:52 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-06-17 00:37:45 +0200
commit8803f28aca4d0b4b55825d13c29772b87aa0de92 (patch)
tree6a0f4208eb34e88eb0d4fa97ba0dca33c70306be /base/common
parentd2e247798a36225880ef6050716cc7576fe2ad7f (diff)
downloadpki-8803f28aca4d0b4b55825d13c29772b87aa0de92.tar.gz
pki-8803f28aca4d0b4b55825d13c29772b87aa0de92.tar.xz
pki-8803f28aca4d0b4b55825d13c29772b87aa0de92.zip
Added search filter for pki ca-authority-find.
The pki ca-authority-find CLI has been modified to provide search filter based on the authority ID, parent ID, authority DN, and issuer DN. https://pagure.io/dogtagpki/issue/2652 Change-Id: I563a0b93eb7a00ae4771069812455ecc552f407c
Diffstat (limited to 'base/common')
-rw-r--r--base/common/src/com/netscape/certsrv/authority/AuthorityClient.java8
-rw-r--r--base/common/src/com/netscape/certsrv/authority/AuthorityResource.java12
2 files changed, 15 insertions, 5 deletions
diff --git a/base/common/src/com/netscape/certsrv/authority/AuthorityClient.java b/base/common/src/com/netscape/certsrv/authority/AuthorityClient.java
index 5a80877ca..f8ca98be2 100644
--- a/base/common/src/com/netscape/certsrv/authority/AuthorityClient.java
+++ b/base/common/src/com/netscape/certsrv/authority/AuthorityClient.java
@@ -38,8 +38,12 @@ public class AuthorityClient extends Client {
proxy = createProxy(AuthorityResource.class);
}
- public List<AuthorityData> listCAs() {
- Response response = proxy.listCAs();
+ public List<AuthorityData> listCAs() throws Exception {
+ return findCAs(null, null, null, null);
+ }
+
+ public List<AuthorityData> findCAs(String id, String parentID, String dn, String issuerDN) throws Exception {
+ Response response = proxy.findCAs(id, parentID, dn, issuerDN);
GenericType<List<AuthorityData>> type = new GenericType<List<AuthorityData>>() {};
return client.getEntity(response, type);
}
diff --git a/base/common/src/com/netscape/certsrv/authority/AuthorityResource.java b/base/common/src/com/netscape/certsrv/authority/AuthorityResource.java
index 0f8b70ade..0e915dba1 100644
--- a/base/common/src/com/netscape/certsrv/authority/AuthorityResource.java
+++ b/base/common/src/com/netscape/certsrv/authority/AuthorityResource.java
@@ -7,6 +7,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.annotations.ClientResponseType;
@@ -20,11 +21,16 @@ public interface AuthorityResource {
public static final String HOST_AUTHORITY = "host-authority";
@GET
- public Response listCAs();
- /*
+ public Response findCAs(
+ @QueryParam("id") String id,
+ @QueryParam("parentID") String parentID,
+ @QueryParam("dn") String dn,
+ @QueryParam("issuerDN") String issuerDN
+ /*
@QueryParam("start") Integer start,
- @QueryParam("size") Integer size);
+ @QueryParam("size") Integer size
*/
+ ) throws Exception;
@GET
@Path("{id}")