diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-03-17 11:40:42 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-03-19 16:19:04 -0400 |
commit | fbd1b96a35946b7ebf36afea3f3a2a50dcbf193f (patch) | |
tree | a8de6caa0be49b39321c546e02b35b6710299f1f /base/common/src/com/netscape/certsrv/tps | |
parent | 4c02156a7cc336afcb2cb46f77d98097eb83cda1 (diff) | |
download | pki-fbd1b96a35946b7ebf36afea3f3a2a50dcbf193f.tar.gz pki-fbd1b96a35946b7ebf36afea3f3a2a50dcbf193f.tar.xz pki-fbd1b96a35946b7ebf36afea3f3a2a50dcbf193f.zip |
Added search filter for TPS resources.
The TPS resources have been modified to accept a basic search filter
for find operation. For resources based on LDAP database, the filtering
is done using LDAP filter. For other resources, the filtering is done
using string comparison. For now the filter is will only be matched
against entry IDs. In the future the filter may be expanded to support
other entry attributes. The CLI has been updated accordingly.
The total attribute in DataCollection was changed from Integer into int
because the total size of the collection cannot be null.
The PKIException constructors have been consolidated into a single
actual constructor. The other constructors have been modified to
call the actual constructor with some default values.
Ticket #847
Diffstat (limited to 'base/common/src/com/netscape/certsrv/tps')
12 files changed, 18 insertions, 12 deletions
diff --git a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java index c9c7b83f3..293c470b7 100644 --- a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java +++ b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java @@ -40,8 +40,8 @@ public class AuthenticatorClient extends Client { resource = createProxy(AuthenticatorResource.class); } - public AuthenticatorCollection findAuthenticators(Integer start, Integer size) { - Response response = resource.findAuthenticators(start, size); + public AuthenticatorCollection findAuthenticators(String filter, Integer start, Integer size) { + Response response = resource.findAuthenticators(filter, start, size); return client.getEntity(response, AuthenticatorCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java index ce570edf1..457549eca 100644 --- a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java +++ b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java @@ -43,6 +43,7 @@ public interface AuthenticatorResource { @GET @ClientResponseType(entityType=AuthenticatorCollection.class) public Response findAuthenticators( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java index e1e192557..fc11c9a27 100644 --- a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java +++ b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java @@ -40,8 +40,8 @@ public class TPSCertClient extends Client { resource = createProxy(TPSCertResource.class); } - public TPSCertCollection findCerts(Integer start, Integer size) { - Response response = resource.findCerts(start, size); + public TPSCertCollection findCerts(String filter, Integer start, Integer size) { + Response response = resource.findCerts(filter, start, size); return client.getEntity(response, TPSCertCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java index cf95dad89..7b8757006 100644 --- a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java +++ b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java @@ -35,6 +35,7 @@ public interface TPSCertResource { @GET @ClientResponseType(entityType=TPSCertCollection.class) public Response findCerts( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java index 4ef59366c..aaf9e6399 100644 --- a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java +++ b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java @@ -40,8 +40,8 @@ public class ConnectionClient extends Client { resource = createProxy(ConnectionResource.class); } - public ConnectionCollection findConnections(Integer start, Integer size) { - Response response = resource.findConnections(start, size); + public ConnectionCollection findConnections(String filter, Integer start, Integer size) { + Response response = resource.findConnections(filter, start, size); return client.getEntity(response, ConnectionCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java index 136cc8784..e16135063 100644 --- a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java +++ b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java @@ -43,6 +43,7 @@ public interface ConnectionResource { @GET @ClientResponseType(entityType=ConnectionCollection.class) public Response findConnections( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileClient.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileClient.java index 9ca571d19..3a659291e 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileClient.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileClient.java @@ -44,8 +44,8 @@ public class ProfileClient extends Client { resource = createProxy(ProfileResource.class); } - public ProfileCollection findProfiles(Integer start, Integer size) { - Response response = resource.findProfiles(start, size); + public ProfileCollection findProfiles(String filter, Integer start, Integer size) { + Response response = resource.findProfiles(filter, start, size); return client.getEntity(response, ProfileCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java index 409d8d718..dafc25f41 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java @@ -40,8 +40,8 @@ public class ProfileMappingClient extends Client { resource = createProxy(ProfileMappingResource.class); } - public ProfileMappingCollection findProfileMappings(Integer start, Integer size) { - Response response = resource.findProfileMappings(start, size); + public ProfileMappingCollection findProfileMappings(String filter, Integer start, Integer size) { + Response response = resource.findProfileMappings(filter, start, size); return client.getEntity(response, ProfileMappingCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java index 694a1810e..5828a3317 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java @@ -43,6 +43,7 @@ public interface ProfileMappingResource { @GET @ClientResponseType(entityType=ProfileMappingCollection.class) public Response findProfileMappings( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java index 4cb466f2f..50a205cd7 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java @@ -43,6 +43,7 @@ public interface ProfileResource { @GET @ClientResponseType(entityType=ProfileCollection.class) public Response findProfiles( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java b/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java index 98690cb99..ba2ae3c0f 100644 --- a/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java +++ b/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java @@ -40,8 +40,8 @@ public class TokenClient extends Client { resource = createProxy(TokenResource.class); } - public TokenCollection findTokens(Integer start, Integer size) { - Response response = resource.findTokens(start, size); + public TokenCollection findTokens(String filter, Integer start, Integer size) { + Response response = resource.findTokens(filter, start, size); return client.getEntity(response, TokenCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java b/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java index f88ce399c..3f5f305ef 100644 --- a/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java +++ b/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java @@ -44,6 +44,7 @@ public interface TokenResource { @GET @ClientResponseType(entityType=TokenCollection.class) public Response findTokens( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); |