From 06c4389901bab109b04841ea712d085d5391e5f0 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Sat, 11 Aug 2012 05:09:02 -0500
Subject: [PATCH] Cleaned up REST server class names.

The REST server classes have been renamed for better clarity
and consistency.

Ticket #259
---
 .../ca/CertificateAuthorityApplication.java        | 36 +++++++++++-----------
 ...esourceService.java => GroupMemberService.java} |  4 +--
 ...GroupResourceService.java => GroupService.java} |  4 +--
 ...ResourceService.java => SystemCertService.java} |  4 +--
 ...rtResourceService.java => UserCertService.java} |  4 +--
 .../{UserResourceService.java => UserService.java} |  4 +--
 .../{CMSResourceService.java => PKIService.java}   |  2 +-
 .../{CertResourceService.java => CertService.java} |  6 ++--
 .../cms/servlet/cert/EnrollmentProcessor.java      |  4 +--
 .../cms/servlet/cert/RenewalProcessor.java         |  4 +--
 .../cms/servlet/cert/RequestProcessor.java         |  4 +--
 ...sourceService.java => SystemConfigService.java} |  6 ++--
 .../{KeyResourceService.java => KeyService.java}   |  6 ++--
 ...ileResourceService.java => ProfileService.java} |  4 +--
 ...esourceService.java => CertRequestService.java} |  4 +--
 ...ResourceService.java => KeyRequestService.java} |  4 +--
 ...tory.java => CertEnrollmentRequestFactory.java} |  2 +-
 .../cms/servlet/request/model/CertRequestDAO.java  |  2 +-
 ...Factory.java => CertReviewResponseFactory.java} |  2 +-
 .../src/com/netscape/cms/servlet/test/DRMTest.java |  6 ++--
 .../kra/KeyRecoveryAuthorityApplication.java       | 32 +++++++++----------
 .../src/com/netscape/ocsp/OCSPApplication.java     | 24 +++++++--------
 base/tks/src/com/netscape/tks/TKSApplication.java  | 24 +++++++--------
 23 files changed, 96 insertions(+), 96 deletions(-)
 rename base/common/src/com/netscape/cms/servlet/admin/{GroupMemberResourceService.java => GroupMemberService.java} (98%)
 rename base/common/src/com/netscape/cms/servlet/admin/{GroupResourceService.java => GroupService.java} (98%)
 rename base/common/src/com/netscape/cms/servlet/admin/{SystemCertificateResourceService.java => SystemCertService.java} (94%)
 rename base/common/src/com/netscape/cms/servlet/admin/{UserCertResourceService.java => UserCertService.java} (99%)
 rename base/common/src/com/netscape/cms/servlet/admin/{UserResourceService.java => UserService.java} (99%)
 rename base/common/src/com/netscape/cms/servlet/base/{CMSResourceService.java => PKIService.java} (99%)
 rename base/common/src/com/netscape/cms/servlet/cert/{CertResourceService.java => CertService.java} (99%)
 rename base/common/src/com/netscape/cms/servlet/csadmin/{SystemConfigurationResourceService.java => SystemConfigService.java} (99%)
 rename base/common/src/com/netscape/cms/servlet/key/{KeyResourceService.java => KeyService.java} (98%)
 rename base/common/src/com/netscape/cms/servlet/profile/{ProfileResourceService.java => ProfileService.java} (97%)
 rename base/common/src/com/netscape/cms/servlet/request/{CertRequestResourceService.java => CertRequestService.java} (98%)
 rename base/common/src/com/netscape/cms/servlet/request/{KeyRequestResourceService.java => KeyRequestService.java} (98%)
 rename base/common/src/com/netscape/cms/servlet/request/model/{EnrollmentRequestDataFactory.java => CertEnrollmentRequestFactory.java} (97%)
 rename base/common/src/com/netscape/cms/servlet/request/model/{AgentEnrollmentRequestDataFactory.java => CertReviewResponseFactory.java} (99%)

diff --git a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
index d539bdb44ad6d13bc83e1676e0c4e9833b01e492..fe08e299b84900b2b86f3c5e73b045baaf709957 100644
--- a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
+++ b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
@@ -5,16 +5,16 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.cms.servlet.admin.GroupMemberResourceService;
-import com.netscape.cms.servlet.admin.GroupResourceService;
-import com.netscape.cms.servlet.admin.SystemCertificateResourceService;
-import com.netscape.cms.servlet.admin.UserCertResourceService;
-import com.netscape.cms.servlet.admin.UserResourceService;
+import com.netscape.cms.servlet.admin.GroupMemberService;
+import com.netscape.cms.servlet.admin.GroupService;
+import com.netscape.cms.servlet.admin.SystemCertService;
+import com.netscape.cms.servlet.admin.UserCertService;
+import com.netscape.cms.servlet.admin.UserService;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.cert.CertResourceService;
-import com.netscape.cms.servlet.csadmin.SystemConfigurationResourceService;
-import com.netscape.cms.servlet.profile.ProfileResourceService;
-import com.netscape.cms.servlet.request.CertRequestResourceService;
+import com.netscape.cms.servlet.cert.CertService;
+import com.netscape.cms.servlet.csadmin.SystemConfigService;
+import com.netscape.cms.servlet.profile.ProfileService;
+import com.netscape.cms.servlet.request.CertRequestService;
 
 public class CertificateAuthorityApplication extends Application {
     private Set<Object> singletons = new HashSet<Object>();
@@ -22,23 +22,23 @@ public class CertificateAuthorityApplication extends Application {
 
     public CertificateAuthorityApplication() {
         // installer
-        classes.add(SystemConfigurationResourceService.class);
+        classes.add(SystemConfigService.class);
 
         // certs and requests
-        classes.add(CertResourceService.class);
-        classes.add(CertRequestResourceService.class);
+        classes.add(CertService.class);
+        classes.add(CertRequestService.class);
 
         // profile management
-        classes.add(ProfileResourceService.class);
+        classes.add(ProfileService.class);
 
         // user and group management
-        classes.add(GroupMemberResourceService.class);
-        classes.add(GroupResourceService.class);
-        classes.add(UserCertResourceService.class);
-        classes.add(UserResourceService.class);
+        classes.add(GroupMemberService.class);
+        classes.add(GroupService.class);
+        classes.add(UserCertService.class);
+        classes.add(UserService.class);
 
         // system certs
-        classes.add(SystemCertificateResourceService.class);
+        classes.add(SystemCertService.class);
 
         // exception mapper
         classes.add(CMSException.Mapper.class);
diff --git a/base/common/src/com/netscape/cms/servlet/admin/GroupMemberResourceService.java b/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/admin/GroupMemberResourceService.java
rename to base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
index c192815aa939d7446b5f7d8cc685de735b8c0fbf..2a7419d33eb99ed1d6a0b2b7b3dba092fd23235e 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/GroupMemberResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
@@ -44,12 +44,12 @@ import com.netscape.certsrv.user.UserResource;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 
 /**
  * @author Endi S. Dewata
  */
-public class GroupMemberResourceService extends CMSResourceService implements GroupMemberResource {
+public class GroupMemberService extends PKIService implements GroupMemberResource {
 
     public final static int DEFAULT_SIZE = 20;
 
diff --git a/base/common/src/com/netscape/cms/servlet/admin/GroupResourceService.java b/base/common/src/com/netscape/cms/servlet/admin/GroupService.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/admin/GroupResourceService.java
rename to base/common/src/com/netscape/cms/servlet/admin/GroupService.java
index ce665ae3e0a3d6deebfc466f59a7d313d0b5d910..868f142c88697319f1b752888991de7b30c60dc8 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/GroupResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/GroupService.java
@@ -41,13 +41,13 @@ import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
 /**
  * @author Endi S. Dewata
  */
-public class GroupResourceService extends CMSResourceService implements GroupResource {
+public class GroupService extends PKIService implements GroupResource {
 
     public final static int DEFAULT_SIZE = 20;
 
diff --git a/base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResourceService.java b/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
similarity index 94%
rename from base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResourceService.java
rename to base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
index 72106a9034c598d4d7710802172e7e6dd9166158..2d86d71ea017f4d1ee48bb43a92c011cceb743b6 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
@@ -26,7 +26,7 @@ import javax.ws.rs.core.Response;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.security.ITransportKeyUnit;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.cert.model.CertificateData;
 
 /**
@@ -35,7 +35,7 @@ import com.netscape.cms.servlet.cert.model.CertificateData;
  * @author alee
  *
  */
-public class SystemCertificateResourceService extends CMSResourceService implements SystemCertificateResource {
+public class SystemCertService extends PKIService implements SystemCertificateResource {
 
     /**
      * Used to retrieve the transport certificate
diff --git a/base/common/src/com/netscape/cms/servlet/admin/UserCertResourceService.java b/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/admin/UserCertResourceService.java
rename to base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
index e0e2ddfde3921f35eff6df065b2e0e518c35f821..4f2304a9701b13770144c6e379469de576614e4a 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/UserCertResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
@@ -51,14 +51,14 @@ import com.netscape.certsrv.user.UserCertResource;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.util.Cert;
 import com.netscape.cmsutil.util.Utils;
 
 /**
  * @author Endi S. Dewata
  */
-public class UserCertResourceService extends CMSResourceService implements UserCertResource {
+public class UserCertService extends PKIService implements UserCertResource {
 
     public final static int DEFAULT_SIZE = 20;
 
diff --git a/base/common/src/com/netscape/cms/servlet/admin/UserResourceService.java b/base/common/src/com/netscape/cms/servlet/admin/UserService.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/admin/UserResourceService.java
rename to base/common/src/com/netscape/cms/servlet/admin/UserService.java
index 1639c591214469dd644b4338b18921feb7554946..1128e09e70eb47b5ea95a72d0fa4ba5c3c15d92c 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/UserResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/UserService.java
@@ -46,13 +46,13 @@ import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
 /**
  * @author Endi S. Dewata
  */
-public class UserResourceService extends CMSResourceService implements UserResource {
+public class UserService extends PKIService implements UserResource {
 
     public final static int DEFAULT_SIZE = 20;
 
diff --git a/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java b/base/common/src/com/netscape/cms/servlet/base/PKIService.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java
rename to base/common/src/com/netscape/cms/servlet/base/PKIService.java
index 48daeca6e45ca0b2257be75e28332975135effa3..de92d290adb3bb8f26aeb44e8d16c477ee42fd70 100644
--- a/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/base/PKIService.java
@@ -46,7 +46,7 @@ import com.netscape.cms.servlet.cert.model.CertificateData;
  * @author alee
  *
  */
-public class CMSResourceService {
+public class PKIService {
 
     public static final String HEADER = "-----BEGIN NEW CERTIFICATE REQUEST-----";
     public static final String TRAILER = "-----END NEW CERTIFICATE REQUEST-----";
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertResourceService.java b/base/common/src/com/netscape/cms/servlet/cert/CertService.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/cert/CertResourceService.java
rename to base/common/src/com/netscape/cms/servlet/cert/CertService.java
index 6a3f0d79a96d9957440e2db86618e5dd6882db25..08a6215294228d26fb9a8febfb3129670ca6bfca 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertService.java
@@ -55,7 +55,7 @@ import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.cms.servlet.base.BadRequestException;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.base.UnauthorizedException;
 import com.netscape.cms.servlet.cert.model.CertDataInfo;
 import com.netscape.cms.servlet.cert.model.CertDataInfos;
@@ -74,14 +74,14 @@ import com.netscape.cmsutil.util.Utils;
  * @author alee
  *
  */
-public class CertResourceService extends CMSResourceService implements CertResource {
+public class CertService extends PKIService implements CertResource {
 
     ICertificateAuthority authority;
     ICertificateRepository repo;
 
     public final static int DEFAULT_SIZE = 20;
 
-    public CertResourceService() {
+    public CertService() {
         authority = (ICertificateAuthority) CMS.getSubsystem("ca");
         repo = authority.getCertificateRepository();
     }
diff --git a/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java
index 8b48f0d73847bcef6a03e46cdafbf590ca7e005f..c1841051b4237083d66d511bf884ef93deab3cd0 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java
@@ -39,7 +39,7 @@ import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.profile.SSLClientCertProvider;
 import com.netscape.cms.servlet.profile.model.ProfileInput;
 import com.netscape.cms.servlet.request.model.EnrollmentRequestData;
-import com.netscape.cms.servlet.request.model.EnrollmentRequestDataFactory;
+import com.netscape.cms.servlet.request.model.CertEnrollmentRequestFactory;
 
 public class EnrollmentProcessor extends CertProcessor {
 
@@ -97,7 +97,7 @@ public class EnrollmentProcessor extends CertProcessor {
             throw new BadRequestDataException(CMS.getUserMessage(locale, "CMS_PROFILE_NOT_FOUND", profileId));
         }
 
-        EnrollmentRequestData data = EnrollmentRequestDataFactory.create(cmsReq, profile, locale);
+        EnrollmentRequestData data = CertEnrollmentRequestFactory.create(cmsReq, profile, locale);
         return processEnrollment(data, cmsReq.getHttpReq());
     }
 
diff --git a/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java
index cc4dd12ae04f61c88f59994fcb2fbafe01b11b1e..3e6c77fbf3a435f0c217ff6befcec4a46a64179c 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java
@@ -45,7 +45,7 @@ import com.netscape.certsrv.request.IRequest;
 import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.profile.SSLClientCertProvider;
 import com.netscape.cms.servlet.request.model.EnrollmentRequestData;
-import com.netscape.cms.servlet.request.model.EnrollmentRequestDataFactory;
+import com.netscape.cms.servlet.request.model.CertEnrollmentRequestFactory;
 
 public class RenewalProcessor extends CertProcessor {
 
@@ -61,7 +61,7 @@ public class RenewalProcessor extends CertProcessor {
             throw new BadRequestDataException(CMS.getUserMessage(locale, "CMS_PROFILE_NOT_FOUND", profileId));
         }
 
-        EnrollmentRequestData data = EnrollmentRequestDataFactory.create(cmsReq, profile, locale);
+        EnrollmentRequestData data = CertEnrollmentRequestFactory.create(cmsReq, profile, locale);
 
         //only used in renewal
         data.setSerialNum(req.getParameter("serial_num"));
diff --git a/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java
index 57e33f3a5aedd3770441706e82cda054e7b2e868..8822be2b2b0a2290cfd07fe6be885396f4409ab7 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java
@@ -58,7 +58,7 @@ import com.netscape.cms.servlet.profile.model.ProfileOutput;
 import com.netscape.cms.servlet.profile.model.ProfileOutputFactory;
 import com.netscape.cms.servlet.profile.model.ProfilePolicySet;
 import com.netscape.cms.servlet.request.model.AgentEnrollmentRequestData;
-import com.netscape.cms.servlet.request.model.AgentEnrollmentRequestDataFactory;
+import com.netscape.cms.servlet.request.model.CertReviewResponseFactory;
 
 public class RequestProcessor extends CertProcessor {
 
@@ -72,7 +72,7 @@ public class RequestProcessor extends CertProcessor {
 
         String profileId = ireq.getExtDataInString("profileId");
         IProfile profile = ps.getProfile(profileId);
-        AgentEnrollmentRequestData data = AgentEnrollmentRequestDataFactory.create(cmsReq, profile, nonces, locale);
+        AgentEnrollmentRequestData data = CertReviewResponseFactory.create(cmsReq, profile, nonces, locale);
 
         processRequest(req, data, request, op);
         return data;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java
rename to base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
index 9747eb12c845af12059f0273d1fc495ad6e59df1..cee8e86e3e6513325a51b71801f825eb2bd8c7fc 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
@@ -53,7 +53,7 @@ import com.netscape.certsrv.ocsp.IOCSPAuthority;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.csadmin.model.CertData;
 import com.netscape.cms.servlet.csadmin.model.ConfigurationData;
 import com.netscape.cms.servlet.csadmin.model.ConfigurationResponseData;
@@ -67,7 +67,7 @@ import com.netscape.cmsutil.util.Utils;
  * @author alee
  *
  */
-public class SystemConfigurationResourceService extends CMSResourceService implements SystemConfigurationResource {
+public class SystemConfigService extends PKIService implements SystemConfigurationResource {
     IConfigStore cs;
     String csType;
     String csState;
@@ -79,7 +79,7 @@ public class SystemConfigurationResourceService extends CMSResourceService imple
             "restart_server_after_configuration";
     private Random random = null;
 
-    public SystemConfigurationResourceService() throws EPropertyNotFound, EBaseException {
+    public SystemConfigService() throws EPropertyNotFound, EBaseException {
         cs = CMS.getConfigStore();
         csType = cs.getString("cs.type");
         csState = cs.getString("cs.state");
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java b/base/common/src/com/netscape/cms/servlet/key/KeyService.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java
rename to base/common/src/com/netscape/cms/servlet/key/KeyService.java
index 560d7f9f84f4ce5208cc6228801b05deae43e3a6..59847da1c81ea3a37eb50d627f4560b5496b72ff 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyService.java
@@ -41,7 +41,7 @@ import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestStatus;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.key.model.KeyData;
 import com.netscape.cms.servlet.key.model.KeyDataInfo;
 import com.netscape.cms.servlet.key.model.KeyDataInfos;
@@ -54,13 +54,13 @@ import com.netscape.cmsutil.ldap.LDAPUtil;
  * @author alee
  *
  */
-public class KeyResourceService extends CMSResourceService implements KeyResource{
+public class KeyService extends PKIService implements KeyResource{
 
     private IKeyRepository repo;
     private IKeyRecoveryAuthority kra;
     private IRequestQueue queue;
 
-    public KeyResourceService() {
+    public KeyService() {
         kra = ( IKeyRecoveryAuthority ) CMS.getSubsystem( "kra" );
         repo = kra.getKeyRepository();
         queue = kra.getRequestQueue();
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileResourceService.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/ProfileResourceService.java
rename to base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
index c391258768918a80d6b94a6ea9f63da2f5fdb1ba..0c13b8bba5603d13c191eab48b7fc762732590f3 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
@@ -32,7 +32,7 @@ import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileInput;
 import com.netscape.certsrv.profile.IProfileSubsystem;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.profile.model.ProfileData;
 import com.netscape.cms.servlet.profile.model.ProfileDataInfo;
 import com.netscape.cms.servlet.profile.model.ProfileDataInfos;
@@ -42,7 +42,7 @@ import com.netscape.cms.servlet.profile.model.ProfileInput;
  * @author alee
  *
  */
-public class ProfileResourceService extends CMSResourceService implements ProfileResource {
+public class ProfileService extends PKIService implements ProfileResource {
 
     private IProfileSubsystem ps = (IProfileSubsystem) CMS.getSubsystem(IProfileSubsystem.ID);
 
diff --git a/base/common/src/com/netscape/cms/servlet/request/CertRequestResourceService.java b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/request/CertRequestResourceService.java
rename to base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
index d107e21914b2b9715ed9adcf02491eacf82ea99d..9178d4c9ee15c470073f83654581f63e91ce823d 100644
--- a/base/common/src/com/netscape/cms/servlet/request/CertRequestResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
@@ -34,7 +34,7 @@ import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.servlet.base.BadRequestException;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.request.model.AgentEnrollmentRequestData;
 import com.netscape.cms.servlet.request.model.CertRequestDAO;
 import com.netscape.cms.servlet.request.model.CertRequestInfo;
@@ -46,7 +46,7 @@ import com.netscape.cmsutil.ldap.LDAPUtil;
  * @author alee
  *
  */
-public class CertRequestResourceService extends CMSResourceService implements CertRequestResource {
+public class CertRequestService extends PKIService implements CertRequestResource {
 
     /**
      * Used to retrieve key request info for a specific request
diff --git a/base/common/src/com/netscape/cms/servlet/request/KeyRequestResourceService.java b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/request/KeyRequestResourceService.java
rename to base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
index d98938b7a125b5e3f7affec0d9563529173ccf5e..ebe6062c8e69fc42546159707c280f348748823d 100644
--- a/base/common/src/com/netscape/cms/servlet/request/KeyRequestResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
@@ -26,7 +26,7 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.request.model.ArchivalRequestData;
 import com.netscape.cms.servlet.request.model.KeyRequestDAO;
 import com.netscape.cms.servlet.request.model.KeyRequestInfo;
@@ -38,7 +38,7 @@ import com.netscape.cmsutil.ldap.LDAPUtil;
  * @author alee
  *
  */
-public class KeyRequestResourceService extends CMSResourceService implements KeyRequestResource {
+public class KeyRequestService extends PKIService implements KeyRequestResource {
 
     /**
      * Used to retrieve key request info for a specific request
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/EnrollmentRequestDataFactory.java b/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequestFactory.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/request/model/EnrollmentRequestDataFactory.java
rename to base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequestFactory.java
index 3a09b7608cb3c0b07c5f79c8628acd0fa549a201..51582d13cd31c44abd426be7bb3bd2ce42e3cf5c 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/EnrollmentRequestDataFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequestFactory.java
@@ -28,7 +28,7 @@ import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.profile.model.ProfileInput;
 import com.netscape.cms.servlet.profile.model.ProfileInputFactory;
 
-public class EnrollmentRequestDataFactory {
+public class CertEnrollmentRequestFactory {
 
     public static EnrollmentRequestData create(CMSRequest cmsReq, IProfile profile, Locale locale)
             throws EProfileException {
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java b/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java
index 4ebfc251f533e21610a73584370c8a3abf7f3b6f..f662a6c89852cd3dec2c9b628bd95720060f9a8d 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java
+++ b/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java
@@ -146,7 +146,7 @@ public class CertRequestDAO extends CMSRequestDAO {
         }
         String profileId = request.getExtDataInString("profileId");
         IProfile profile = ps.getProfile(profileId);
-        AgentEnrollmentRequestData info = AgentEnrollmentRequestDataFactory.create(request, profile, uriInfo, locale);
+        AgentEnrollmentRequestData info = CertReviewResponseFactory.create(request, profile, uriInfo, locale);
         if (ca.noncesEnabled()) {
             addNonce(info, servletRequest);
         }
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/AgentEnrollmentRequestDataFactory.java b/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponseFactory.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/request/model/AgentEnrollmentRequestDataFactory.java
rename to base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponseFactory.java
index fff1a59dfb42fb7aa62c5faa12f7dc1bde06bd8e..5c2106802d35e8e95e93273d594d895ef2ac9c1c 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/AgentEnrollmentRequestDataFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponseFactory.java
@@ -45,7 +45,7 @@ import com.netscape.cms.servlet.profile.model.ProfileInputFactory;
 import com.netscape.cms.servlet.profile.model.ProfilePolicy;
 import com.netscape.cms.servlet.profile.model.ProfilePolicySet;
 
-public class AgentEnrollmentRequestDataFactory {
+public class CertReviewResponseFactory {
 
     public static AgentEnrollmentRequestData create(IRequest request, IProfile profile, UriInfo uriInfo, Locale locale) throws EBaseException {
         AgentEnrollmentRequestData ret = new AgentEnrollmentRequestData();
diff --git a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
index 9954ba94f74e708974fc98bb1c4776ac2ed4a80f..3ccde1cd2816198df63f23bdbdf391f091486286 100644
--- a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
+++ b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
@@ -40,7 +40,7 @@ import org.mozilla.jss.util.Password;
 import com.netscape.certsrv.dbs.keydb.KeyId;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.client.cli.ClientConfig;
-import com.netscape.cms.servlet.base.CMSResourceService;
+import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.key.model.KeyData;
 import com.netscape.cms.servlet.key.model.KeyDataInfo;
 import com.netscape.cms.servlet.request.KeyRequestResource;
@@ -209,8 +209,8 @@ public class DRMTest {
 
         // Test 1: Get transport certificate from DRM
         transportCert = client.getTransportCert();
-        transportCert = transportCert.substring(CMSResourceService.HEADER.length(),
-                                                transportCert.indexOf(CMSResourceService.TRAILER));
+        transportCert = transportCert.substring(PKIService.HEADER.length(),
+                                                transportCert.indexOf(PKIService.TRAILER));
 
         log("Transport Cert retrieved from DRM: " + transportCert);
 
diff --git a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
index 612b0ff1886a5499fbd6f73dcc2e92d062ffa782..9a884f872b829d452c3dae1b67640b0a749152dc 100644
--- a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
+++ b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
@@ -5,15 +5,15 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.cms.servlet.admin.GroupMemberResourceService;
-import com.netscape.cms.servlet.admin.GroupResourceService;
-import com.netscape.cms.servlet.admin.SystemCertificateResourceService;
-import com.netscape.cms.servlet.admin.UserCertResourceService;
-import com.netscape.cms.servlet.admin.UserResourceService;
+import com.netscape.cms.servlet.admin.GroupMemberService;
+import com.netscape.cms.servlet.admin.GroupService;
+import com.netscape.cms.servlet.admin.SystemCertService;
+import com.netscape.cms.servlet.admin.UserCertService;
+import com.netscape.cms.servlet.admin.UserService;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.csadmin.SystemConfigurationResourceService;
-import com.netscape.cms.servlet.key.KeyResourceService;
-import com.netscape.cms.servlet.request.KeyRequestResourceService;
+import com.netscape.cms.servlet.csadmin.SystemConfigService;
+import com.netscape.cms.servlet.key.KeyService;
+import com.netscape.cms.servlet.request.KeyRequestService;
 
 public class KeyRecoveryAuthorityApplication extends Application {
 
@@ -22,20 +22,20 @@ public class KeyRecoveryAuthorityApplication extends Application {
 
     public KeyRecoveryAuthorityApplication() {
         // installer
-        classes.add(SystemConfigurationResourceService.class);
+        classes.add(SystemConfigService.class);
 
         // keys and keyrequests
-        classes.add(KeyResourceService.class);
-        classes.add(KeyRequestResourceService.class);
+        classes.add(KeyService.class);
+        classes.add(KeyRequestService.class);
 
         // user and group management
-        classes.add(GroupMemberResourceService.class);
-        classes.add(GroupResourceService.class);
-        classes.add(UserCertResourceService.class);
-        classes.add(UserResourceService.class);
+        classes.add(GroupMemberService.class);
+        classes.add(GroupService.class);
+        classes.add(UserCertService.class);
+        classes.add(UserService.class);
 
         // system certs
-        classes.add(SystemCertificateResourceService.class);
+        classes.add(SystemCertService.class);
 
         // exception mapper
         classes.add(CMSException.Mapper.class);
diff --git a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
index 5e70fe49f16261796a2ad4a36bb9bd923b10e647..7331c38d6109c1be314392e2f5bc791124df050f 100644
--- a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
+++ b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
@@ -5,13 +5,13 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.cms.servlet.admin.GroupMemberResourceService;
-import com.netscape.cms.servlet.admin.GroupResourceService;
-import com.netscape.cms.servlet.admin.SystemCertificateResourceService;
-import com.netscape.cms.servlet.admin.UserCertResourceService;
-import com.netscape.cms.servlet.admin.UserResourceService;
+import com.netscape.cms.servlet.admin.GroupMemberService;
+import com.netscape.cms.servlet.admin.GroupService;
+import com.netscape.cms.servlet.admin.SystemCertService;
+import com.netscape.cms.servlet.admin.UserCertService;
+import com.netscape.cms.servlet.admin.UserService;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.csadmin.SystemConfigurationResourceService;
+import com.netscape.cms.servlet.csadmin.SystemConfigService;
 
 public class OCSPApplication extends Application {
 
@@ -20,16 +20,16 @@ public class OCSPApplication extends Application {
 
     public OCSPApplication() {
         // installer
-        classes.add(SystemConfigurationResourceService.class);
+        classes.add(SystemConfigService.class);
 
         // user and group management
-        classes.add(GroupMemberResourceService.class);
-        classes.add(GroupResourceService.class);
-        classes.add(UserCertResourceService.class);
-        classes.add(UserResourceService.class);
+        classes.add(GroupMemberService.class);
+        classes.add(GroupService.class);
+        classes.add(UserCertService.class);
+        classes.add(UserService.class);
 
         // system certs
-        classes.add(SystemCertificateResourceService.class);
+        classes.add(SystemCertService.class);
 
         // exception mapper
         classes.add(CMSException.Mapper.class);
diff --git a/base/tks/src/com/netscape/tks/TKSApplication.java b/base/tks/src/com/netscape/tks/TKSApplication.java
index df3c293bd2d4a637dc502b0dd252abbaae52bf41..2afdf1297fe4f87038175ada6b3f8e0c8aae1160 100644
--- a/base/tks/src/com/netscape/tks/TKSApplication.java
+++ b/base/tks/src/com/netscape/tks/TKSApplication.java
@@ -5,13 +5,13 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.cms.servlet.admin.GroupMemberResourceService;
-import com.netscape.cms.servlet.admin.GroupResourceService;
-import com.netscape.cms.servlet.admin.SystemCertificateResourceService;
-import com.netscape.cms.servlet.admin.UserCertResourceService;
-import com.netscape.cms.servlet.admin.UserResourceService;
+import com.netscape.cms.servlet.admin.GroupMemberService;
+import com.netscape.cms.servlet.admin.GroupService;
+import com.netscape.cms.servlet.admin.SystemCertService;
+import com.netscape.cms.servlet.admin.UserCertService;
+import com.netscape.cms.servlet.admin.UserService;
 import com.netscape.cms.servlet.base.CMSException;
-import com.netscape.cms.servlet.csadmin.SystemConfigurationResourceService;
+import com.netscape.cms.servlet.csadmin.SystemConfigService;
 
 public class TKSApplication extends Application {
 
@@ -20,16 +20,16 @@ public class TKSApplication extends Application {
 
     public TKSApplication() {
         // installer
-        classes.add(SystemConfigurationResourceService.class);
+        classes.add(SystemConfigService.class);
 
         // user and group management
-        classes.add(GroupMemberResourceService.class);
-        classes.add(GroupResourceService.class);
-        classes.add(UserCertResourceService.class);
-        classes.add(UserResourceService.class);
+        classes.add(GroupMemberService.class);
+        classes.add(GroupService.class);
+        classes.add(UserCertService.class);
+        classes.add(UserService.class);
 
         // system certs
-        classes.add(SystemCertificateResourceService.class);
+        classes.add(SystemCertService.class);
 
         // exception mapper
         classes.add(CMSException.Mapper.class);
-- 
1.7.11.2

