From b0bca63ac46e079e3a21ed1c4d6fd532966568d0 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Sun, 29 Apr 2012 19:44:56 -0700 Subject: Provide CA EE Restful interface and test client. Tickets #144 and #145 Providing the following: 1. Simple EE restful interface for certificates, printing, listing and searching. 2. Simple EE restful interface for certificate enrollment requests. 3. Simple EE restful interface for profiles and profile properties. 4. Simple Test client to exercise the functionality. 5. Created restful client base class inherited by CARestClient and DRMRestClient. 6. Provide simple restful implementations of new interfaces added. ToDO: Need some more refactoring to base classes for some of the new classes which are similar to classes in the DRM restful area. ToDO: Actual certificate enrollment code that will be refactored from existing ProfileSubmitServlet. Provide CA EE Restful interface and test client review fixes. --- .../cms/servlet/profile/ProfileResource.java | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java (limited to 'base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java') diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java new file mode 100644 index 000000000..38f7ee038 --- /dev/null +++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java @@ -0,0 +1,40 @@ +package com.netscape.cms.servlet.profile; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import com.netscape.cms.servlet.profile.model.ProfileData; + +@Path("/profile") +public interface ProfileResource { + + @GET + @Path("{id}") + @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML }) + public ProfileData retrieveProfile(@PathParam("id") String id); + + /** + * Used to retrieve a key + * + * @param data + * @return + */ + + /* + @POST + @Path("retrieve") + @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML }) + @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) + public ProfileData retrieveProfile(ProfileRetrievalRequestData request); + + // retrieval - used to test integration with a browser + @POST + @Path("retrieve") + @Produces(MediaType.TEXT_XML) + @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) + public ProfileData retrievProfile(MultivaluedMap form); + */ +} \ No newline at end of file -- cgit