diff options
Diffstat (limited to 'base/common/src')
18 files changed, 44 insertions, 39 deletions
diff --git a/base/common/src/com/netscape/certsrv/base/DataCollection.java b/base/common/src/com/netscape/certsrv/base/DataCollection.java index f5f46bcb8..ecbef0a6b 100644 --- a/base/common/src/com/netscape/certsrv/base/DataCollection.java +++ b/base/common/src/com/netscape/certsrv/base/DataCollection.java @@ -30,15 +30,15 @@ import org.jboss.resteasy.plugins.providers.atom.Link; */ public class DataCollection<E> { - Integer total; + int total; Collection<E> entries = new ArrayList<E>(); Collection<Link> links = new ArrayList<Link>(); - public Integer getTotal() { + public int getTotal() { return total; } - public void setTotal(Integer total) { + public void setTotal(int total) { this.total = total; } diff --git a/base/common/src/com/netscape/certsrv/base/PKIException.java b/base/common/src/com/netscape/certsrv/base/PKIException.java index f89c1b18c..ae557d465 100644 --- a/base/common/src/com/netscape/certsrv/base/PKIException.java +++ b/base/common/src/com/netscape/certsrv/base/PKIException.java @@ -31,44 +31,41 @@ public class PKIException extends RuntimeException { public int code; + public PKIException(int code, String message, Throwable cause) { + super(message, cause); + this.code = code; + } + public PKIException(Response.Status status) { - super(status.getReasonPhrase()); - code = status.getStatusCode(); + this(status, status.getReasonPhrase(), null); } public PKIException(String message) { - super(message); - code = Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(); + this(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), message, null); } public PKIException(int code, String message) { - super(message); - this.code = code; + this(code, message, null); } public PKIException(Response.Status status, String message) { - super(message); - code = status.getStatusCode(); + this(status.getStatusCode(), message, null); } - public PKIException(String message, Throwable cause) { - super(message, cause); - code = Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(); + public PKIException(Throwable cause) { + this(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), cause.getMessage(), cause); } - public PKIException(int code, String message, Throwable cause) { - super(message, cause); - this.code = code; + public PKIException(String message, Throwable cause) { + this(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), message, cause); } public PKIException(Response.Status status, String message, Throwable cause) { - super(message, cause); - code = status.getStatusCode(); + this(status.getStatusCode(), message, cause); } public PKIException(Data data) { - super(data.message); - code = data.code; + this(data.code, data.message, null); } public int getCode() { diff --git a/base/common/src/com/netscape/certsrv/logging/ActivityClient.java b/base/common/src/com/netscape/certsrv/logging/ActivityClient.java index eae2f6f48..1fc3bcc21 100644 --- a/base/common/src/com/netscape/certsrv/logging/ActivityClient.java +++ b/base/common/src/com/netscape/certsrv/logging/ActivityClient.java @@ -40,13 +40,13 @@ public class ActivityClient extends Client { resource = createProxy(ActivityResource.class); } - public ActivityCollection findActivities(Integer start, Integer size) { - Response response = resource.findActivities(start, size); + public ActivityCollection findActivities(String filter, Integer start, Integer size) { + Response response = resource.findActivities(filter, start, size); return client.getEntity(response, ActivityCollection.class); } - public ActivityData getActivity(String tokenID) { - Response response = resource.getActivity(tokenID); + public ActivityData getActivity(String activityID) { + Response response = resource.getActivity(activityID); return client.getEntity(response, ActivityData.class); } } diff --git a/base/common/src/com/netscape/certsrv/logging/ActivityResource.java b/base/common/src/com/netscape/certsrv/logging/ActivityResource.java index bc6d375ca..3e0a0502e 100644 --- a/base/common/src/com/netscape/certsrv/logging/ActivityResource.java +++ b/base/common/src/com/netscape/certsrv/logging/ActivityResource.java @@ -35,6 +35,7 @@ public interface ActivityResource { @GET @ClientResponseType(entityType=ActivityCollection.class) public Response findActivities( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); diff --git a/base/common/src/com/netscape/certsrv/selftests/SelfTestClient.java b/base/common/src/com/netscape/certsrv/selftests/SelfTestClient.java index a48698bfa..108cc1f8f 100644 --- a/base/common/src/com/netscape/certsrv/selftests/SelfTestClient.java +++ b/base/common/src/com/netscape/certsrv/selftests/SelfTestClient.java @@ -40,8 +40,8 @@ public class SelfTestClient extends Client { resource = createProxy(SelfTestResource.class); } - public SelfTestCollection findSelfTests(Integer start, Integer size) { - Response response = resource.findSelfTests(start, size); + public SelfTestCollection findSelfTests(String filter, Integer start, Integer size) { + Response response = resource.findSelfTests(filter, start, size); return client.getEntity(response, SelfTestCollection.class); } diff --git a/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java b/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java index 90dfcb4b1..04f41999d 100644 --- a/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java +++ b/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java @@ -41,6 +41,7 @@ public interface SelfTestResource { @GET @ClientResponseType(entityType=SelfTestCollection.class) public Response findSelfTests( + @QueryParam("filter") String filter, @QueryParam("start") Integer start, @QueryParam("size") Integer size); 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); |
