From f72f19fb68a8533b1a36cf617830cb97e500867e Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Sat, 11 Aug 2012 09:47:39 -0500
Subject: [PATCH] Reorganized REST common classes.

The common classes used by REST client and services have been moved
into the com.netscape.certsrv.<component> packages.

Ticket #215
---
 .../src/com/netscape/cms/servlet/test/CATest.java  | 28 +++++++++++-----------
 .../ca/CertificateAuthorityApplication.java        |  2 +-
 .../cms/servlet/test/ConfigurationTest.java        |  6 ++---
 .../base/BadRequestException.java                  |  2 +-
 .../servlet/base/model => certsrv/base}/Link.java  |  2 +-
 .../servlet => certsrv}/base/PKIException.java     |  2 +-
 .../base/UnauthorizedException.java                |  3 ++-
 .../cert/model => certsrv/cert}/CertData.java      |  2 +-
 .../cert/model => certsrv/cert}/CertDataInfo.java  |  2 +-
 .../cert/model => certsrv/cert}/CertDataInfos.java |  2 +-
 .../cert}/CertEnrollmentRequest.java               |  6 ++---
 .../cert/CertNotFoundException.java                |  4 ++--
 .../model => certsrv/cert}/CertRequestInfo.java    |  3 ++-
 .../model => certsrv/cert}/CertRequestInfos.java   |  4 ++--
 .../cert}/CertRequestResource.java                 |  6 +----
 .../servlet => certsrv}/cert/CertResource.java     |  8 +------
 .../cert}/CertRetrievalRequest.java                |  2 +-
 .../model => certsrv/cert}/CertReviewResponse.java | 10 ++++----
 .../model => certsrv/cert}/CertRevokeRequest.java  |  2 +-
 .../model => certsrv/cert}/CertSearchRequest.java  |  2 +-
 .../cert}/CertUnrevokeRequest.java                 |  2 +-
 .../model => certsrv/key}/KeyArchivalRequest.java  |  2 +-
 .../servlet/key/model => certsrv/key}/KeyData.java |  2 +-
 .../key/model => certsrv/key}/KeyDataInfo.java     |  2 +-
 .../key/model => certsrv/key}/KeyDataInfos.java    |  4 ++--
 .../model => certsrv/key}/KeyRecoveryRequest.java  |  2 +-
 .../model => certsrv/key}/KeyRequestInfo.java      |  3 ++-
 .../model => certsrv/key}/KeyRequestInfos.java     |  4 ++--
 .../key}/KeyRequestResource.java                   |  6 +----
 .../{cms/servlet => certsrv}/key/KeyResource.java  |  5 +---
 .../profile}/PolicyConstraint.java                 |  2 +-
 .../profile}/PolicyConstraintValue.java            |  2 +-
 .../model => certsrv/profile}/PolicyDefault.java   |  2 +-
 .../profile}/ProfileAttribute.java                 |  2 +-
 .../model => certsrv/profile}/ProfileData.java     |  2 +-
 .../model => certsrv/profile}/ProfileDataInfo.java |  2 +-
 .../profile}/ProfileDataInfos.java                 |  4 ++--
 .../model => certsrv/profile}/ProfileInput.java    |  2 +-
 .../profile/ProfileNotFoundException.java          |  4 ++--
 .../model => certsrv/profile}/ProfileOutput.java   |  2 +-
 .../model => certsrv/profile}/ProfilePolicy.java   |  2 +-
 .../profile}/ProfilePolicySet.java                 |  2 +-
 .../profile/ProfileResource.java                   |  4 +---
 .../profile}/ProfileRetrievalRequest.java          |  2 +-
 .../model => certsrv/request}/CMSRequestInfo.java  |  5 +---
 .../model => certsrv/request}/CMSRequestInfos.java |  4 ++--
 .../request/RequestNotFoundException.java          |  5 ++--
 .../system}/ConfigurationRequest.java              |  2 +-
 .../system}/ConfigurationResponse.java             |  2 +-
 .../model => certsrv/system}/DomainInfo.java       |  2 +-
 .../model => certsrv/system}/InstallToken.java     |  2 +-
 .../system}/InstallTokenRequest.java               |  2 +-
 .../system}/SecurityDomainHost.java                |  2 +-
 .../system}/SecurityDomainHostList.java            |  2 +-
 .../model => certsrv/system}/SystemCertData.java   |  2 +-
 .../system}/SystemCertificateResource.java         |  4 ++--
 .../system}/SystemConfigResource.java              |  7 +-----
 .../netscape/cms/client/PKIErrorInterceptor.java   |  2 +-
 .../src/com/netscape/cms/client/ca/CAClient.java   | 24 +++++++++----------
 .../src/com/netscape/cms/client/cert/CertCLI.java  |  6 ++---
 .../com/netscape/cms/client/cert/CertClient.java   | 26 ++++++++++----------
 .../com/netscape/cms/client/cert/CertFindCLI.java  |  8 +++----
 .../com/netscape/cms/client/cert/CertHoldCLI.java  |  6 ++---
 .../cms/client/cert/CertReleaseHoldCLI.java        |  6 ++---
 .../cms/client/cert/CertRequestApproveCLI.java     |  4 ++--
 .../cms/client/cert/CertRequestReviewCLI.java      |  4 ++--
 .../cms/client/cert/CertRequestSubmitCLI.java      |  6 ++---
 .../netscape/cms/client/cert/CertRevokeCLI.java    |  6 ++---
 .../com/netscape/cms/client/cert/CertShowCLI.java  |  2 +-
 .../src/com/netscape/cms/client/kra/DRMClient.java | 22 ++++++++---------
 .../cms/client/system/SystemConfigClient.java      | 10 ++++----
 .../cms/servlet/admin/GroupMemberService.java      |  2 +-
 .../netscape/cms/servlet/admin/GroupService.java   |  2 +-
 .../cms/servlet/admin/SystemCertService.java       |  3 ++-
 .../cms/servlet/admin/UserCertService.java         |  2 +-
 .../netscape/cms/servlet/admin/UserService.java    |  2 +-
 .../com/netscape/cms/servlet/base/PKIService.java  |  2 +-
 .../servlet/cert/CertEnrollmentRequestFactory.java |  4 ++--
 .../netscape/cms/servlet/cert/CertProcessor.java   |  4 ++--
 .../netscape/cms/servlet/cert/CertRequestDAO.java  | 15 ++++++------
 .../cms/servlet/cert/CertRequestInfoFactory.java   |  5 ++--
 .../servlet/cert/CertReviewResponseFactory.java    | 16 ++++++-------
 .../com/netscape/cms/servlet/cert/CertService.java | 24 ++++++++++---------
 .../com/netscape/cms/servlet/cert/DoRevoke.java    |  2 +-
 .../com/netscape/cms/servlet/cert/DoUnrevoke.java  |  2 +-
 .../cms/servlet/cert/EnrollmentProcessor.java      |  4 ++--
 .../cms/servlet/cert/RenewalProcessor.java         |  2 +-
 .../cms/servlet/cert/RequestProcessor.java         | 12 +++++-----
 .../cms/servlet/cert/RevocationProcessor.java      |  4 ++--
 .../cms/servlet/csadmin/ConfigurationUtils.java    |  4 ++--
 .../cms/servlet/csadmin/SystemConfigService.java   | 15 ++++++------
 .../netscape/cms/servlet/key/KeyRequestDAO.java    | 15 ++++++------
 .../com/netscape/cms/servlet/key/KeyService.java   | 11 +++++----
 .../servlet/profile/PolicyConstraintFactory.java   |  4 ++--
 .../cms/servlet/profile/PolicyDefaultFactory.java  |  4 ++--
 .../cms/servlet/profile/ProfileInputFactory.java   |  2 +-
 .../cms/servlet/profile/ProfileOutputFactory.java  |  4 ++--
 .../cms/servlet/profile/ProfileProcessServlet.java |  6 ++---
 .../cms/servlet/profile/ProfileService.java        | 10 ++++----
 .../cms/servlet/request/CMSRequestDAO.java         |  6 ++---
 .../cms/servlet/request/CertRequestService.java    | 14 ++++++-----
 .../cms/servlet/request/KeyRequestService.java     | 12 ++++++----
 base/deploy/src/scriptlets/pkijython.py            |  7 +++---
 .../src/com/netscape/cms/servlet/test/DRMTest.java | 10 ++++----
 .../kra/KeyRecoveryAuthorityApplication.java       |  2 +-
 .../netscape/kra/SecurityDataRecoveryService.java  |  2 +-
 .../src/com/netscape/kra/SecurityDataService.java  |  3 ++-
 .../src/com/netscape/ocsp/OCSPApplication.java     |  2 +-
 base/tks/src/com/netscape/tks/TKSApplication.java  |  2 +-
 109 files changed, 284 insertions(+), 295 deletions(-)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/base/BadRequestException.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/base/model => certsrv/base}/Link.java (97%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/base/PKIException.java (99%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/base/UnauthorizedException.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertData.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertDataInfo.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertDataInfos.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/cert}/CertEnrollmentRequest.java (98%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/cert/CertNotFoundException.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/cert}/CertRequestInfo.java (96%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/cert}/CertRequestInfos.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/request => certsrv/cert}/CertRequestResource.java (93%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/cert/CertResource.java (84%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/cert}/CertRetrievalRequest.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/cert}/CertReviewResponse.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertRevokeRequest.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertSearchRequest.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/cert/model => certsrv/cert}/CertUnrevokeRequest.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/key}/KeyArchivalRequest.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/key/model => certsrv/key}/KeyData.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/key/model => certsrv/key}/KeyDataInfo.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/key/model => certsrv/key}/KeyDataInfos.java (96%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/key}/KeyRecoveryRequest.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/key}/KeyRequestInfo.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/key}/KeyRequestInfos.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/request => certsrv/key}/KeyRequestResource.java (91%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/key/KeyResource.java (87%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/PolicyConstraint.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/PolicyConstraintValue.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/PolicyDefault.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileAttribute.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileData.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileDataInfo.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileDataInfos.java (96%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileInput.java (98%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/profile/ProfileNotFoundException.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfileOutput.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfilePolicy.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/profile/model => certsrv/profile}/ProfilePolicySet.java (97%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/profile/ProfileResource.java (87%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/profile}/ProfileRetrievalRequest.java (97%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/request}/CMSRequestInfo.java (92%)
 rename base/common/src/com/netscape/{cms/servlet/request/model => certsrv/request}/CMSRequestInfos.java (94%)
 rename base/common/src/com/netscape/{cms/servlet => certsrv}/request/RequestNotFoundException.java (89%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/ConfigurationRequest.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/ConfigurationResponse.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/DomainInfo.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/InstallToken.java (96%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/InstallTokenRequest.java (98%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/SecurityDomainHost.java (96%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/SecurityDomainHostList.java (95%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin/model => certsrv/system}/SystemCertData.java (99%)
 rename base/common/src/com/netscape/{cms/servlet/admin => certsrv/system}/SystemCertificateResource.java (85%)
 rename base/common/src/com/netscape/{cms/servlet/csadmin => certsrv/system}/SystemConfigResource.java (84%)

diff --git a/base/ca/functional/src/com/netscape/cms/servlet/test/CATest.java b/base/ca/functional/src/com/netscape/cms/servlet/test/CATest.java
index a230b468a92a671da4a4481c4ddb328af883d382..b00084d429667db0c1deaa38bab120933f16dc58 100644
--- a/base/ca/functional/src/com/netscape/cms/servlet/test/CATest.java
+++ b/base/ca/functional/src/com/netscape/cms/servlet/test/CATest.java
@@ -33,24 +33,24 @@ import org.mozilla.jss.crypto.AlreadyInitializedException;
 import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.util.Password;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertDataInfo;
+import com.netscape.certsrv.cert.CertDataInfos;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertNotFoundException;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
+import com.netscape.certsrv.cert.CertReviewResponse;
+import com.netscape.certsrv.cert.CertSearchRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
+import com.netscape.certsrv.profile.ProfileData;
+import com.netscape.certsrv.profile.ProfileDataInfo;
+import com.netscape.certsrv.profile.ProfileDataInfos;
+import com.netscape.certsrv.profile.ProfileInput;
 import com.netscape.certsrv.request.RequestId;
+import com.netscape.certsrv.request.RequestNotFoundException;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.ca.CAClient;
-import com.netscape.cms.servlet.cert.CertNotFoundException;
-import com.netscape.cms.servlet.cert.model.CertDataInfo;
-import com.netscape.cms.servlet.cert.model.CertDataInfos;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.profile.model.ProfileData;
-import com.netscape.cms.servlet.profile.model.ProfileDataInfo;
-import com.netscape.cms.servlet.profile.model.ProfileDataInfos;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
-import com.netscape.cms.servlet.request.RequestNotFoundException;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class CATest {
 
diff --git a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
index 6a426bd09e3ced68529095181fdcb9c027d111d4..bb6431907ee77c9ff7890b8c18fae95d96adf129 100644
--- a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
+++ b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
@@ -5,12 +5,12 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
+import com.netscape.certsrv.base.PKIException;
 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.PKIException;
 import com.netscape.cms.servlet.cert.CertService;
 import com.netscape.cms.servlet.csadmin.SystemConfigService;
 import com.netscape.cms.servlet.profile.ProfileService;
diff --git a/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java b/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
index f9fa62d0a6b6df1d86d4dfea5d544b6ca0e7b9bd..462137ec76ed19d92b2f6bb54cbfda401a9e8253 100644
--- a/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
+++ b/base/common/functional/src/com/netscape/cms/servlet/test/ConfigurationTest.java
@@ -56,11 +56,11 @@ import org.mozilla.jss.pkix.primitive.Name;
 import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo;
 import org.mozilla.jss.util.Password;
 
+import com.netscape.certsrv.system.ConfigurationRequest;
+import com.netscape.certsrv.system.ConfigurationResponse;
+import com.netscape.certsrv.system.SystemCertData;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.system.SystemConfigClient;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.SystemCertData;
 import com.netscape.cmsutil.util.Utils;
 
 /**
diff --git a/base/common/src/com/netscape/cms/servlet/base/BadRequestException.java b/base/common/src/com/netscape/certsrv/base/BadRequestException.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/base/BadRequestException.java
rename to base/common/src/com/netscape/certsrv/base/BadRequestException.java
index cefa2698516d287dcf3f0f912f3a7822759f0a42..48face306747ca5ac485e57af42c28d9061cbcd3 100644
--- a/base/common/src/com/netscape/cms/servlet/base/BadRequestException.java
+++ b/base/common/src/com/netscape/certsrv/base/BadRequestException.java
@@ -15,7 +15,7 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.base;
+package com.netscape.certsrv.base;
 import javax.ws.rs.core.Response;
 
 public class BadRequestException extends PKIException {
diff --git a/base/common/src/com/netscape/cms/servlet/base/model/Link.java b/base/common/src/com/netscape/certsrv/base/Link.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/base/model/Link.java
rename to base/common/src/com/netscape/certsrv/base/Link.java
index 336092abe1aa7b52dd664992eb25612e2c3e4c24..427d1c2751b4ebfc4978036c3b2ab841a13632b1 100644
--- a/base/common/src/com/netscape/cms/servlet/base/model/Link.java
+++ b/base/common/src/com/netscape/certsrv/base/Link.java
@@ -15,7 +15,7 @@
 // (C) 2011 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---/**
-package com.netscape.cms.servlet.base.model;
+package com.netscape.certsrv.base;
 
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlRootElement;
diff --git a/base/common/src/com/netscape/cms/servlet/base/PKIException.java b/base/common/src/com/netscape/certsrv/base/PKIException.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/base/PKIException.java
rename to base/common/src/com/netscape/certsrv/base/PKIException.java
index be2629e17824d8b919c591e3914bdd88c02d7bd5..6afb8f72bda44246c27be789f657a62dc230f9de 100644
--- a/base/common/src/com/netscape/cms/servlet/base/PKIException.java
+++ b/base/common/src/com/netscape/certsrv/base/PKIException.java
@@ -15,7 +15,7 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.base;
+package com.netscape.certsrv.base;
 
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
diff --git a/base/common/src/com/netscape/cms/servlet/base/UnauthorizedException.java b/base/common/src/com/netscape/certsrv/base/UnauthorizedException.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/base/UnauthorizedException.java
rename to base/common/src/com/netscape/certsrv/base/UnauthorizedException.java
index 83803601cde40b203c37aa6e6c989dd6cadc698a..f82c06754821f63e126c98dd53f7aa4180f5827f 100644
--- a/base/common/src/com/netscape/cms/servlet/base/UnauthorizedException.java
+++ b/base/common/src/com/netscape/certsrv/base/UnauthorizedException.java
@@ -16,10 +16,11 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.base;
+package com.netscape.certsrv.base;
 
 import javax.ws.rs.core.Response;
 
+
 /**
  * @author Endi S. Dewata
  */
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertData.java b/base/common/src/com/netscape/certsrv/cert/CertData.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertData.java
rename to base/common/src/com/netscape/certsrv/cert/CertData.java
index 50fcf81da0fadcce8eb51af6dc611a317316b134..58f7fcd2c91b3115b71db294f3508687faba193f 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertData.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertData.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.io.PrintWriter;
 import java.io.StringReader;
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfo.java b/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfo.java
rename to base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
index 4c6a9b19e5f9e2c19fce269096ae858b8cb5a752..969e3e371d7b10d0d23643f1c84b30dd25d7df69 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfo.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
@@ -18,7 +18,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.io.StringReader;
 import java.io.StringWriter;
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfos.java b/base/common/src/com/netscape/certsrv/cert/CertDataInfos.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfos.java
rename to base/common/src/com/netscape/certsrv/cert/CertDataInfos.java
index 189c58cbeb9d2de467dc4aacf3fcf4a8e9112571..475e90815404104b8441c6e467ddcd331660b816 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertDataInfos.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertDataInfos.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequest.java b/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequest.java
rename to base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
index a249d657daf93f1c2ed183edce8fc0ef6416586c..fefef9a4625433851f408781683f8d2c4be00d23 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.cert;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -39,8 +39,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
-import com.netscape.cms.servlet.profile.model.ProfileInput;
-import com.netscape.cms.servlet.profile.model.ProfileOutput;
+import com.netscape.certsrv.profile.ProfileInput;
+import com.netscape.certsrv.profile.ProfileOutput;
 
 /**
  * @author jmagne
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertNotFoundException.java b/base/common/src/com/netscape/certsrv/cert/CertNotFoundException.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/cert/CertNotFoundException.java
rename to base/common/src/com/netscape/certsrv/cert/CertNotFoundException.java
index bcfc18aaf383e99614252b4e9a390851c1a81365..ce0962a843861668179e653b9f47e75e3fd67147 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertNotFoundException.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertNotFoundException.java
@@ -15,12 +15,12 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.cert;
+package com.netscape.certsrv.cert;
 
 import javax.ws.rs.core.Response;
 
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.dbs.certdb.CertId;
-import com.netscape.cms.servlet.base.PKIException;
 
 public class CertNotFoundException extends PKIException {
 
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfo.java b/base/common/src/com/netscape/certsrv/cert/CertRequestInfo.java
similarity index 96%
rename from base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfo.java
rename to base/common/src/com/netscape/certsrv/cert/CertRequestInfo.java
index 0754fe5478157420a0c29cb902bc92713017702f..d11e945437e902ca7c5b13760fb091d990f6ece2 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfo.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertRequestInfo.java
@@ -16,7 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.cert;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import com.netscape.certsrv.dbs.certdb.CertId;
+import com.netscape.certsrv.request.CMSRequestInfo;
 
 @XmlRootElement(name = "CertRequestInfo")
 @XmlAccessorType(XmlAccessType.FIELD)
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfos.java b/base/common/src/com/netscape/certsrv/cert/CertRequestInfos.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfos.java
rename to base/common/src/com/netscape/certsrv/cert/CertRequestInfos.java
index a4c39a33ef3873def3f8a56ba6294624cb96f2aa..028bff58338db97497c104aeac9043d0030b21b7 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfos.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertRequestInfos.java
@@ -15,7 +15,7 @@
 // (C) 2011 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.cert;
 
 import java.util.Collection;
 import java.util.List;
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
-import com.netscape.cms.servlet.base.model.Link;
+import com.netscape.certsrv.base.Link;
 
 @XmlRootElement(name = "CertRequestInfos")
 public class CertRequestInfos {
diff --git a/base/common/src/com/netscape/cms/servlet/request/CertRequestResource.java b/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java
similarity index 93%
rename from base/common/src/com/netscape/cms/servlet/request/CertRequestResource.java
rename to base/common/src/com/netscape/certsrv/cert/CertRequestResource.java
index 8a6d1b1828c3cc3e9a7a64967146c4500baf04e5..1a186f6275a0e6b875064f1f41a4b6979522b9ac 100644
--- a/base/common/src/com/netscape/cms/servlet/request/CertRequestResource.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java
@@ -15,7 +15,7 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request;
+package com.netscape.certsrv.cert;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
@@ -29,10 +29,6 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
 import com.netscape.certsrv.request.RequestId;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 @Path("")
 public interface CertRequestResource {
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertResource.java b/base/common/src/com/netscape/certsrv/cert/CertResource.java
similarity index 84%
rename from base/common/src/com/netscape/cms/servlet/cert/CertResource.java
rename to base/common/src/com/netscape/certsrv/cert/CertResource.java
index e937b28164dcb064dc5e99a719677e3a7d9ff0b3..1d5958824298dd201a6aba882bd29dd89b36635e 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertResource.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertResource.java
@@ -1,4 +1,4 @@
-package com.netscape.cms.servlet.cert;
+package com.netscape.certsrv.cert;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
@@ -11,12 +11,6 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 
 import com.netscape.certsrv.dbs.certdb.CertId;
-import com.netscape.cms.servlet.cert.model.CertDataInfos;
-import com.netscape.cms.servlet.cert.model.CertRevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
-import com.netscape.cms.servlet.cert.model.CertUnrevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 @Path("")
 public interface CertResource {
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRetrievalRequest.java b/base/common/src/com/netscape/certsrv/cert/CertRetrievalRequest.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/request/model/CertRetrievalRequest.java
rename to base/common/src/com/netscape/certsrv/cert/CertRetrievalRequest.java
index 9b8caacd91b23a04c2c133dc238d6a6751b124e6..ac8ea079ac468ed7d819f1ce68e494882b5a86d6 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertRetrievalRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertRetrievalRequest.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.cert;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponse.java b/base/common/src/com/netscape/certsrv/cert/CertReviewResponse.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponse.java
rename to base/common/src/com/netscape/certsrv/cert/CertReviewResponse.java
index 3bec6bada0c11f6d65e55652b567d0932e2e6f57..776c905678989ef0d9bad471126e74b65b86ad74 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponse.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertReviewResponse.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.cert;
 
 import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
@@ -30,12 +30,12 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
+import com.netscape.certsrv.profile.PolicyDefault;
+import com.netscape.certsrv.profile.ProfileAttribute;
+import com.netscape.certsrv.profile.ProfilePolicy;
+import com.netscape.certsrv.profile.ProfilePolicySet;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestIdAdapter;
-import com.netscape.cms.servlet.profile.model.PolicyDefault;
-import com.netscape.cms.servlet.profile.model.ProfileAttribute;
-import com.netscape.cms.servlet.profile.model.ProfilePolicy;
-import com.netscape.cms.servlet.profile.model.ProfilePolicySet;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.FIELD)
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertRevokeRequest.java b/base/common/src/com/netscape/certsrv/cert/CertRevokeRequest.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertRevokeRequest.java
rename to base/common/src/com/netscape/certsrv/cert/CertRevokeRequest.java
index ef9ccebc3891e386f154803104d0a1a68bef861c..7b86286cedafe224eca05135b3b3080305e49f0d 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertRevokeRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertRevokeRequest.java
@@ -16,7 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.io.StringReader;
 import java.io.StringWriter;
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertSearchRequest.java b/base/common/src/com/netscape/certsrv/cert/CertSearchRequest.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertSearchRequest.java
rename to base/common/src/com/netscape/certsrv/cert/CertSearchRequest.java
index 54b9ad8e68c058c8dd3145d02a930236006fdf41..5ae8596ba4a6c20de8be8c7bab8f131ed5fd3420 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertSearchRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertSearchRequest.java
@@ -18,7 +18,7 @@
 
 // TODO: This class is brute force. Come up with a way to divide these search filter entities into
 // smaller classes
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.io.Reader;
 import java.util.Calendar;
diff --git a/base/common/src/com/netscape/cms/servlet/cert/model/CertUnrevokeRequest.java b/base/common/src/com/netscape/certsrv/cert/CertUnrevokeRequest.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/cert/model/CertUnrevokeRequest.java
rename to base/common/src/com/netscape/certsrv/cert/CertUnrevokeRequest.java
index 98d24d36367cc2c511e870d5f1baba8d3885b53b..7885482be0a4afa734fbf82abe3102675f620de9 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/model/CertUnrevokeRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertUnrevokeRequest.java
@@ -16,7 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.cert.model;
+package com.netscape.certsrv.cert;
 
 import java.io.StringReader;
 import java.io.StringWriter;
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/KeyArchivalRequest.java b/base/common/src/com/netscape/certsrv/key/KeyArchivalRequest.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/request/model/KeyArchivalRequest.java
rename to base/common/src/com/netscape/certsrv/key/KeyArchivalRequest.java
index 9cd544ff8117dec9b72b77d2fee5d546b8192d99..2d2d84c945695da5084b58dd21a3ea8fbbe5930c 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/KeyArchivalRequest.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyArchivalRequest.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.key;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java b/base/common/src/com/netscape/certsrv/key/KeyData.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/key/model/KeyData.java
rename to base/common/src/com/netscape/certsrv/key/KeyData.java
index 2ff2b5d0c501191510f1211bc8c64baa12879095..63c0591c24c6d1e5a8615304d1e121e072cdbefb 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyData.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.key.model;
+package com.netscape.certsrv.key;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlRootElement;
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java b/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java
rename to base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
index 6fd9649fb8ce11f47b9f75e53ba5784ee52467b9..6f4751dcc73fa79c70cabe3b4bdefd3d3de863ec 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
@@ -18,7 +18,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.key.model;
+package com.netscape.certsrv.key;
 
 
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java b/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
similarity index 96%
rename from base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java
rename to base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
index 79e5add958de1bb32d2ac1bdcd3097b090e682a9..c0482029960e06f913eff7c8d8c3c93477567ac2 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.key.model;
+package com.netscape.certsrv.key;
 
 import java.util.Collection;
 import java.util.List;
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
-import com.netscape.cms.servlet.base.model.Link;
+import com.netscape.certsrv.base.Link;
 
 @XmlRootElement(name = "SecurityDataInfos")
 public class KeyDataInfos {
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/KeyRecoveryRequest.java b/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/request/model/KeyRecoveryRequest.java
rename to base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java
index 3cb17d283429e1eabb009ffe2a8c883c94a59c1c..d14f612418cfbd2c2c18baed8873330041d67672 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/KeyRecoveryRequest.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.key;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfo.java b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfo.java
rename to base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
index 91d5f82104f5f0aea4a61e93965fe9843bbbe2ea..2a0e062e5be3f1c7c92272b2877f86f35a2ef0d5 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfo.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
@@ -16,7 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.key;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.request.CMSRequestInfo;
 
 @XmlRootElement(name = "SecurityDataRequestInfo")
 @XmlAccessorType(XmlAccessType.FIELD)
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfos.java b/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfos.java
rename to base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
index dc1b6a5e4c8392a56fb2ec9471ebac52fb6d512f..67e6fdf5cae841325c0e57cd138fb579b25f9c24 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestInfos.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
@@ -15,7 +15,7 @@
 // (C) 2011 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.key;
 
 import java.util.Collection;
 import java.util.List;
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
-import com.netscape.cms.servlet.base.model.Link;
+import com.netscape.certsrv.base.Link;
 
 @XmlRootElement(name = "SecurityDataRequestInfos")
 public class KeyRequestInfos {
diff --git a/base/common/src/com/netscape/cms/servlet/request/KeyRequestResource.java b/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java
similarity index 91%
rename from base/common/src/com/netscape/cms/servlet/request/KeyRequestResource.java
rename to base/common/src/com/netscape/certsrv/key/KeyRequestResource.java
index d583d9580559e671ae7aa77a1438ce893a8f97cc..7fecd06106a92aaad2239a2198b3f1d137eb4df0 100644
--- a/base/common/src/com/netscape/cms/servlet/request/KeyRequestResource.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java
@@ -1,4 +1,4 @@
-package com.netscape.cms.servlet.request;
+package com.netscape.certsrv.key;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
@@ -12,10 +12,6 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
 import com.netscape.certsrv.request.RequestId;
-import com.netscape.cms.servlet.request.model.KeyArchivalRequest;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
-import com.netscape.cms.servlet.request.model.KeyRequestInfos;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
 
 @Path("agent/keyrequests")
 public interface KeyRequestResource {
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java b/base/common/src/com/netscape/certsrv/key/KeyResource.java
similarity index 87%
rename from base/common/src/com/netscape/cms/servlet/key/KeyResource.java
rename to base/common/src/com/netscape/certsrv/key/KeyResource.java
index 948f2ff992ec753e4a343f4668cff16fe155c721..a499ca11fdcd43177bc7e858787ac2fbf4c1966a 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyResource.java
@@ -1,4 +1,4 @@
-package com.netscape.cms.servlet.key;
+package com.netscape.certsrv.key;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
@@ -10,9 +10,6 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
-import com.netscape.cms.servlet.key.model.KeyData;
-import com.netscape.cms.servlet.key.model.KeyDataInfos;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
 
 @Path("agent/keys")
 public interface KeyResource {
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraint.java b/base/common/src/com/netscape/certsrv/profile/PolicyConstraint.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraint.java
rename to base/common/src/com/netscape/certsrv/profile/PolicyConstraint.java
index 588431a83e1b25116210d3faa6382b35046e7d9e..8b43661a2c4ba2a4bd1774d0aac9d1852a0dab63 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraint.java
+++ b/base/common/src/com/netscape/certsrv/profile/PolicyConstraint.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintValue.java b/base/common/src/com/netscape/certsrv/profile/PolicyConstraintValue.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintValue.java
rename to base/common/src/com/netscape/certsrv/profile/PolicyConstraintValue.java
index 7b60e7ea6228a262bebbd1b0cbcc08797b4e4dcf..5241ad8323c55f755357065f4b9baa040f59ff45 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintValue.java
+++ b/base/common/src/com/netscape/certsrv/profile/PolicyConstraintValue.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefault.java b/base/common/src/com/netscape/certsrv/profile/PolicyDefault.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefault.java
rename to base/common/src/com/netscape/certsrv/profile/PolicyDefault.java
index 2c66fc9dcbf70efd1a3fd88c5093443ecf642d99..2b95cf5f00af87451ed302b0bd4a7ef5c226b24b 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefault.java
+++ b/base/common/src/com/netscape/certsrv/profile/PolicyDefault.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileAttribute.java b/base/common/src/com/netscape/certsrv/profile/ProfileAttribute.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileAttribute.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileAttribute.java
index 616c0695d423113dfd3a4683f7cd14ab9d61ed3a..9c889bb8a1881a241f0d079c66f51385e9427cec 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileAttribute.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileAttribute.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileData.java b/base/common/src/com/netscape/certsrv/profile/ProfileData.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileData.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileData.java
index 7f7f26b2929776ac8f435f56ec775e1ff497b3a7..465981add8bc81c2f77051e031a83234aaf54179 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileData.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileData.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.Iterator;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfo.java b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfo.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfo.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileDataInfo.java
index d5083c7a4c690ef905c530d70fe0642b7b33351d..22062309d979ab9430de8e9d4f4d2e8fbd1bf19b 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfo.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfo.java
@@ -16,7 +16,7 @@
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfos.java b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java
similarity index 96%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfos.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java
index e14ac6641de3356d89a3653f12060a3564802453..ed2c11cf7f84401ce9204a8edf9fa4c0589aa389 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileDataInfos.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.Collection;
 import java.util.List;
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
-import com.netscape.cms.servlet.base.model.Link;
+import com.netscape.certsrv.base.Link;
 
 @XmlRootElement(name = "ProfileDataInfos")
 public class ProfileDataInfos {
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInput.java b/base/common/src/com/netscape/certsrv/profile/ProfileInput.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileInput.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileInput.java
index 631a013ccabb00c3e837612c50d4e43e3ac6022b..64d2aafdbbdd22136f39740df088d70ad566af4a 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInput.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileInput.java
@@ -15,7 +15,7 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileNotFoundException.java b/base/common/src/com/netscape/certsrv/profile/ProfileNotFoundException.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/profile/ProfileNotFoundException.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileNotFoundException.java
index e597f471e87829fe5785dc619777ce5d09cc84a0..7a1c9ea62830b4e5d94812eea6ca3913bf5d9157 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileNotFoundException.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileNotFoundException.java
@@ -15,11 +15,11 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile;
+package com.netscape.certsrv.profile;
 
 import javax.ws.rs.core.Response;
 
-import com.netscape.cms.servlet.base.PKIException;
+import com.netscape.certsrv.base.PKIException;
 
 public class ProfileNotFoundException extends PKIException {
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutput.java b/base/common/src/com/netscape/certsrv/profile/ProfileOutput.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutput.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileOutput.java
index f27db4101d92794aedef6f1ecd3dcd6c0ba33d99..2e25f619d2f2860fe493dc595b81497309ab608a 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutput.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileOutput.java
@@ -15,7 +15,7 @@
 // (C) 2007 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicy.java b/base/common/src/com/netscape/certsrv/profile/ProfilePolicy.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicy.java
rename to base/common/src/com/netscape/certsrv/profile/ProfilePolicy.java
index a24f936195e13bafc282262e59a2973d9549a6cf..d5f84f188b17ff59e36d122c13aa8f90994a206a 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicy.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfilePolicy.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.io.ByteArrayOutputStream;
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicySet.java b/base/common/src/com/netscape/certsrv/profile/ProfilePolicySet.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicySet.java
rename to base/common/src/com/netscape/certsrv/profile/ProfilePolicySet.java
index 784f5670d87760fbfc318824d21020d3f2dcc127..6c1dc2b9dc4e3780cbac3b18a3580bf3afc04b4b 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfilePolicySet.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfilePolicySet.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
+package com.netscape.certsrv.profile;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java b/base/common/src/com/netscape/certsrv/profile/ProfileResource.java
similarity index 87%
rename from base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileResource.java
index cc32234b278e3c03b58b82509fb58399562862bf..6dadef560d5f7a2dfc6024b6874fe42b72bf7ed4 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileResource.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileResource.java
@@ -1,4 +1,4 @@
-package com.netscape.cms.servlet.profile;
+package com.netscape.certsrv.profile;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
@@ -6,8 +6,6 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
-import com.netscape.cms.servlet.profile.model.ProfileData;
-import com.netscape.cms.servlet.profile.model.ProfileDataInfos;
 
 @Path("agent/profiles")
 public interface ProfileResource {
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/ProfileRetrievalRequest.java b/base/common/src/com/netscape/certsrv/profile/ProfileRetrievalRequest.java
similarity index 97%
rename from base/common/src/com/netscape/cms/servlet/request/model/ProfileRetrievalRequest.java
rename to base/common/src/com/netscape/certsrv/profile/ProfileRetrievalRequest.java
index 8670605fc4eb5c6696823cdcdb50bbdc43cce9a9..608686b7913247730daa4a79ea7161db82873109 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/ProfileRetrievalRequest.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileRetrievalRequest.java
@@ -19,7 +19,7 @@
 /**
  *
  */
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.profile;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfo.java b/base/common/src/com/netscape/certsrv/request/CMSRequestInfo.java
similarity index 92%
rename from base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfo.java
rename to base/common/src/com/netscape/certsrv/request/CMSRequestInfo.java
index f06334f6b05d55822723aac5cb402dc378af6ef1..0be24fbb49df800c6718e764baf9bd4f34cd0d78 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfo.java
+++ b/base/common/src/com/netscape/certsrv/request/CMSRequestInfo.java
@@ -15,16 +15,13 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.request;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import com.netscape.certsrv.request.RequestId;
-import com.netscape.certsrv.request.RequestStatus;
-import com.netscape.certsrv.request.RequestStatusAdapter;
 @XmlAccessorType(XmlAccessType.FIELD)
 public  class CMSRequestInfo {
 
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfos.java b/base/common/src/com/netscape/certsrv/request/CMSRequestInfos.java
similarity index 94%
rename from base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfos.java
rename to base/common/src/com/netscape/certsrv/request/CMSRequestInfos.java
index 63b2e56b15e8d84335bc8e9766a2f56a81cab245..cb07caf71218b6d5e52e9267e38e526eb865ff6c 100644
--- a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestInfos.java
+++ b/base/common/src/com/netscape/certsrv/request/CMSRequestInfos.java
@@ -15,12 +15,12 @@
 //(C) 2011 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.request.model;
+package com.netscape.certsrv.request;
 
 import java.util.Collection;
 import java.util.List;
 
-import com.netscape.cms.servlet.base.model.Link;
+import com.netscape.certsrv.base.Link;
 
 //Convenience class to simply hold a Collection of CMSRequests and a List of Links.
 public class CMSRequestInfos {
diff --git a/base/common/src/com/netscape/cms/servlet/request/RequestNotFoundException.java b/base/common/src/com/netscape/certsrv/request/RequestNotFoundException.java
similarity index 89%
rename from base/common/src/com/netscape/cms/servlet/request/RequestNotFoundException.java
rename to base/common/src/com/netscape/certsrv/request/RequestNotFoundException.java
index 6bef885f9d9269ded0aa7f711279cdfc5e094172..3db10dd3a4c4e5129e37158aa1afa3c56cf0c378 100644
--- a/base/common/src/com/netscape/cms/servlet/request/RequestNotFoundException.java
+++ b/base/common/src/com/netscape/certsrv/request/RequestNotFoundException.java
@@ -1,9 +1,8 @@
-package com.netscape.cms.servlet.request;
+package com.netscape.certsrv.request;
 
 import javax.ws.rs.core.Response;
 
-import com.netscape.certsrv.request.RequestId;
-import com.netscape.cms.servlet.base.PKIException;
+import com.netscape.certsrv.base.PKIException;
 
 public class RequestNotFoundException extends PKIException {
 
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java b/base/common/src/com/netscape/certsrv/system/ConfigurationRequest.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java
rename to base/common/src/com/netscape/certsrv/system/ConfigurationRequest.java
index b42403f4e67d4684a5dc5a53a8ae312b5edff4c3..ac29b2da7f40e790823c492e6d9cc23eec88b5ba 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java
+++ b/base/common/src/com/netscape/certsrv/system/ConfigurationRequest.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import java.util.Collection;
 
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java b/base/common/src/com/netscape/certsrv/system/ConfigurationResponse.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java
rename to base/common/src/com/netscape/certsrv/system/ConfigurationResponse.java
index 2fcd37d9dcb4f16b2be2cc26b58dfe71e7c05f58..489970c9cb8611d08c68ad3113a10710f0dca8ff 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java
+++ b/base/common/src/com/netscape/certsrv/system/ConfigurationResponse.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import java.security.cert.CertificateEncodingException;
 import java.util.ArrayList;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java b/base/common/src/com/netscape/certsrv/system/DomainInfo.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java
rename to base/common/src/com/netscape/certsrv/system/DomainInfo.java
index 7ba351cb1e1d20c3704eb9072a9d0d242f7fdf5d..50b606af38c0467cc1cda33e7899fdbc58ce35bb 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java
+++ b/base/common/src/com/netscape/certsrv/system/DomainInfo.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK --- 
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java b/base/common/src/com/netscape/certsrv/system/InstallToken.java
similarity index 96%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java
rename to base/common/src/com/netscape/certsrv/system/InstallToken.java
index 59284de37911f6c3472746ce0ef7e99ec29cb9d8..aa34893a1f71c09288f33aa98f98e637ae20bae9 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java
+++ b/base/common/src/com/netscape/certsrv/system/InstallToken.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK --- 
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java b/base/common/src/com/netscape/certsrv/system/InstallTokenRequest.java
similarity index 98%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java
rename to base/common/src/com/netscape/certsrv/system/InstallTokenRequest.java
index 40be4179d3e586a84b6f7dd2a46beae6e7a490b3..bc000a96a9eb19f88919ab41789557f7469fd5aa 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java
+++ b/base/common/src/com/netscape/certsrv/system/InstallTokenRequest.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK --- 
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java b/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
similarity index 96%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java
rename to base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
index cd12cfaf245c42832a507fc83ad1575f34fc19b4..9dbf4e8a99e70b80adacf0efac1c3e1e00ed1f3d 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java
+++ b/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java b/base/common/src/com/netscape/certsrv/system/SecurityDomainHostList.java
similarity index 95%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java
rename to base/common/src/com/netscape/certsrv/system/SecurityDomainHostList.java
index 71922731e89e82ff803999f97b767f997e547cc4..375dee754e7f23362e341bb29c5fb65eda129b81 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java
+++ b/base/common/src/com/netscape/certsrv/system/SecurityDomainHostList.java
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import java.util.Collection;
 
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java b/base/common/src/com/netscape/certsrv/system/SystemCertData.java
similarity index 99%
rename from base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java
rename to base/common/src/com/netscape/certsrv/system/SystemCertData.java
index bd98fe95ca010309c413266f20b476a876c6a158..a509e3fb546edb4cedc215a7f27d5a5630cf74d1 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java
+++ b/base/common/src/com/netscape/certsrv/system/SystemCertData.java
@@ -16,7 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-package com.netscape.cms.servlet.csadmin.model;
+package com.netscape.certsrv.system;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.xml.bind.annotation.XmlAccessType;
diff --git a/base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResource.java b/base/common/src/com/netscape/certsrv/system/SystemCertificateResource.java
similarity index 85%
rename from base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResource.java
rename to base/common/src/com/netscape/certsrv/system/SystemCertificateResource.java
index 16b3b5b5d1ea280e67e3899640272a612d321231..1096520fc7a0dd0bbc3f2ecfbb26a7f2d322a2c2 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/SystemCertificateResource.java
+++ b/base/common/src/com/netscape/certsrv/system/SystemCertificateResource.java
@@ -1,4 +1,4 @@
-package com.netscape.cms.servlet.admin;
+package com.netscape.certsrv.system;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
@@ -8,7 +8,7 @@ import javax.ws.rs.core.Response;
 
 import org.jboss.resteasy.annotations.ClientResponseType;
 
-import com.netscape.cms.servlet.cert.model.CertData;
+import com.netscape.certsrv.cert.CertData;
 
 @Path("config/cert")
 public interface SystemCertificateResource {
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java b/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java
similarity index 84%
rename from base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java
rename to base/common/src/com/netscape/certsrv/system/SystemConfigResource.java
index 9cb6791e3381715c95607c801ce505ca123cda4e..4ecafc6f779dcc9ffe8577b30b629a8d8b1a5834 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java
+++ b/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java
@@ -15,7 +15,7 @@
 // (C) 2012 Red Hat, Inc.
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.csadmin;
+package com.netscape.certsrv.system;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -25,11 +25,6 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.DomainInfo;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
 
 /**
  * @author alee
diff --git a/base/common/src/com/netscape/cms/client/PKIErrorInterceptor.java b/base/common/src/com/netscape/cms/client/PKIErrorInterceptor.java
index 2c1936a6f4c8bf1aedf134b3bec556ac27327628..445778db41cadd033a3c4dadf15c61a39785ce80 100644
--- a/base/common/src/com/netscape/cms/client/PKIErrorInterceptor.java
+++ b/base/common/src/com/netscape/cms/client/PKIErrorInterceptor.java
@@ -23,7 +23,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import org.jboss.resteasy.client.ClientResponse;
 import org.jboss.resteasy.client.core.ClientErrorInterceptor;
 
-import com.netscape.cms.servlet.base.PKIException;
+import com.netscape.certsrv.base.PKIException;
 
 public class PKIErrorInterceptor implements ClientErrorInterceptor {
 
diff --git a/base/common/src/com/netscape/cms/client/ca/CAClient.java b/base/common/src/com/netscape/cms/client/ca/CAClient.java
index 17d017cce91ff3c03095df387d1280e872a9251b..a72f95962d7dbcfa882afe5aad88f21dfb21c743 100644
--- a/base/common/src/com/netscape/cms/client/ca/CAClient.java
+++ b/base/common/src/com/netscape/cms/client/ca/CAClient.java
@@ -20,22 +20,22 @@ package com.netscape.cms.client.ca;
 import java.net.URISyntaxException;
 import java.util.Collection;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertDataInfos;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
+import com.netscape.certsrv.cert.CertRequestResource;
+import com.netscape.certsrv.cert.CertResource;
+import com.netscape.certsrv.cert.CertReviewResponse;
+import com.netscape.certsrv.cert.CertSearchRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
+import com.netscape.certsrv.profile.ProfileData;
+import com.netscape.certsrv.profile.ProfileDataInfos;
+import com.netscape.certsrv.profile.ProfileResource;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.PKIClient;
-import com.netscape.cms.servlet.cert.CertResource;
-import com.netscape.cms.servlet.cert.model.CertDataInfos;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.profile.ProfileResource;
-import com.netscape.cms.servlet.profile.model.ProfileData;
-import com.netscape.cms.servlet.profile.model.ProfileDataInfos;
-import com.netscape.cms.servlet.request.CertRequestResource;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class CAClient extends PKIClient {
 
diff --git a/base/common/src/com/netscape/cms/client/cert/CertCLI.java b/base/common/src/com/netscape/cms/client/cert/CertCLI.java
index ced2560ec9177e55358c61499de0647f25292fc8..f7bb27597ab249ecc22d7681d7a178c45b4d7389 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertCLI.java
@@ -23,11 +23,11 @@ import java.util.Arrays;
 import org.apache.commons.lang.StringUtils;
 import org.jboss.resteasy.plugins.providers.atom.Link;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertDataInfo;
+import com.netscape.certsrv.cert.CertRequestInfo;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.cert.model.CertDataInfo;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/cert/CertClient.java b/base/common/src/com/netscape/cms/client/cert/CertClient.java
index 254e8a143d9a4eb5fa28fd5d63f4d6e0825d99e3..1fcb9e40d034f25cbf639738755ff8b784b09a34 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertClient.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertClient.java
@@ -19,21 +19,21 @@ package com.netscape.cms.client.cert;
 
 import java.net.URISyntaxException;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertDataInfos;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
+import com.netscape.certsrv.cert.CertRequestResource;
+import com.netscape.certsrv.cert.CertResource;
+import com.netscape.certsrv.cert.CertReviewResponse;
+import com.netscape.certsrv.cert.CertRevokeRequest;
+import com.netscape.certsrv.cert.CertSearchRequest;
+import com.netscape.certsrv.cert.CertUnrevokeRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.PKIClient;
-import com.netscape.cms.servlet.cert.CertResource;
-import com.netscape.cms.servlet.cert.model.CertDataInfos;
-import com.netscape.cms.servlet.cert.model.CertRevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
-import com.netscape.cms.servlet.cert.model.CertUnrevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.CertRequestResource;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 /**
  * @author Endi S. Dewata
@@ -70,11 +70,11 @@ public class CertClient extends PKIClient {
         return certClient.unrevokeCert(id, request);
     }
 
-    public CertRequestInfos enrollRequest(CertEnrollmentRequest data){
+    public CertRequestInfos enrollRequest(CertEnrollmentRequest data) {
         return certRequestResource.enrollCert(data);
     }
 
-    public CertReviewResponse reviewRequest(RequestId id){
+    public CertReviewResponse reviewRequest(RequestId id) {
         return certRequestResource.reviewRequest(id);
     }
 
diff --git a/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java b/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
index e67276ac34e0d571d9c9035dda1f4fa894084054..f695062246d5a0691b9dca2b0a895e548a502dc2 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
@@ -28,12 +28,12 @@ import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.ParseException;
 
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.cert.CertDataInfo;
+import com.netscape.certsrv.cert.CertDataInfos;
+import com.netscape.certsrv.cert.CertSearchRequest;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.base.PKIException;
-import com.netscape.cms.servlet.cert.model.CertDataInfo;
-import com.netscape.cms.servlet.cert.model.CertDataInfos;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/cert/CertHoldCLI.java b/base/common/src/com/netscape/cms/client/cert/CertHoldCLI.java
index 1e283b722fee34d2eaac38e8ccca20e28ecf1cfa..33667f3f0796539143114a0526d2df9727fa8f7e 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertHoldCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertHoldCLI.java
@@ -26,13 +26,13 @@ import netscape.security.x509.RevocationReason;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRevokeRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.cert.model.CertRevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/cert/CertReleaseHoldCLI.java b/base/common/src/com/netscape/cms/client/cert/CertReleaseHoldCLI.java
index 920c642e54fd2a131de61d57d9007fab923964ef..10408273fd23076636925bcb16eec03eaaa38130 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertReleaseHoldCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertReleaseHoldCLI.java
@@ -23,13 +23,13 @@ import java.io.InputStreamReader;
 
 import org.apache.commons.cli.CommandLine;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertUnrevokeRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.cert.model.CertUnrevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/cert/CertRequestApproveCLI.java b/base/common/src/com/netscape/cms/client/cert/CertRequestApproveCLI.java
index 91cb26e1471e1537ec75e898487aceb962fdce25..c96f482c8d18e83b6969be0673ba8204e8ab62e0 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertRequestApproveCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertRequestApproveCLI.java
@@ -10,10 +10,10 @@ import javax.xml.bind.Unmarshaller;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.ParseException;
 
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.base.PKIException;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 
 public class CertRequestApproveCLI extends CLI {
     CertCLI parent;
diff --git a/base/common/src/com/netscape/cms/client/cert/CertRequestReviewCLI.java b/base/common/src/com/netscape/cms/client/cert/CertRequestReviewCLI.java
index 61c8506e7e31feadf4a7dfd1726d3ee41c1db6a3..22b1faed39fbe7822b754ea876d824c748c533e7 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertRequestReviewCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertRequestReviewCLI.java
@@ -11,11 +11,11 @@ import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.ParseException;
 
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.base.PKIException;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 
 public class CertRequestReviewCLI extends CLI {
 
diff --git a/base/common/src/com/netscape/cms/client/cert/CertRequestSubmitCLI.java b/base/common/src/com/netscape/cms/client/cert/CertRequestSubmitCLI.java
index 021400f755a1b7aadc0d7fb04a70f42d77e88a5f..cd974b031dffc405be90edc6af49c45efe2e4f40 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertRequestSubmitCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertRequestSubmitCLI.java
@@ -11,11 +11,11 @@ import javax.xml.bind.Unmarshaller;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.ParseException;
 
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class CertRequestSubmitCLI extends CLI {
 
diff --git a/base/common/src/com/netscape/cms/client/cert/CertRevokeCLI.java b/base/common/src/com/netscape/cms/client/cert/CertRevokeCLI.java
index 611e50c37d8d34342d13f958aa9c41d720a4be25..de5dddc09cd7eecb0a82f848d8484a987abfcc9f 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertRevokeCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertRevokeCLI.java
@@ -26,13 +26,13 @@ import netscape.security.x509.RevocationReason;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRevokeRequest;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.cert.model.CertRevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/cert/CertShowCLI.java b/base/common/src/com/netscape/cms/client/cert/CertShowCLI.java
index a16e36f3fda6f8031fea8e496dbf9c5fd27f2155..4fcfc8c3d918d5c80ccd31bf62ad5f7fd06a81c2 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertShowCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertShowCLI.java
@@ -24,10 +24,10 @@ import java.io.PrintWriter;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 
+import com.netscape.certsrv.cert.CertData;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.cms.client.cli.CLI;
 import com.netscape.cms.client.cli.MainCLI;
-import com.netscape.cms.servlet.cert.model.CertData;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/client/kra/DRMClient.java b/base/common/src/com/netscape/cms/client/kra/DRMClient.java
index 2332eacb2cd6bfd5e6ed8896c185cb14c0f8f158..4bcf52987131cbc57e5e8875b601d68cdee91cc1 100644
--- a/base/common/src/com/netscape/cms/client/kra/DRMClient.java
+++ b/base/common/src/com/netscape/cms/client/kra/DRMClient.java
@@ -6,21 +6,21 @@ import java.util.Iterator;
 
 import org.jboss.resteasy.client.ClientResponse;
 
+import com.netscape.certsrv.cert.CertData;
 import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.key.KeyArchivalRequest;
+import com.netscape.certsrv.key.KeyData;
+import com.netscape.certsrv.key.KeyDataInfo;
+import com.netscape.certsrv.key.KeyDataInfos;
+import com.netscape.certsrv.key.KeyRecoveryRequest;
+import com.netscape.certsrv.key.KeyRequestInfo;
+import com.netscape.certsrv.key.KeyRequestInfos;
+import com.netscape.certsrv.key.KeyRequestResource;
+import com.netscape.certsrv.key.KeyResource;
 import com.netscape.certsrv.request.RequestId;
+import com.netscape.certsrv.system.SystemCertificateResource;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.PKIClient;
-import com.netscape.cms.servlet.admin.SystemCertificateResource;
-import com.netscape.cms.servlet.cert.model.CertData;
-import com.netscape.cms.servlet.key.KeyResource;
-import com.netscape.cms.servlet.key.model.KeyData;
-import com.netscape.cms.servlet.key.model.KeyDataInfo;
-import com.netscape.cms.servlet.key.model.KeyDataInfos;
-import com.netscape.cms.servlet.request.KeyRequestResource;
-import com.netscape.cms.servlet.request.model.KeyArchivalRequest;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
-import com.netscape.cms.servlet.request.model.KeyRequestInfos;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
 import com.netscape.cmsutil.util.Utils;
 
 public class DRMClient  extends PKIClient {
diff --git a/base/common/src/com/netscape/cms/client/system/SystemConfigClient.java b/base/common/src/com/netscape/cms/client/system/SystemConfigClient.java
index c01558ed3720077fe5144f7a7b47e467168390e0..c9ee28718b5e323cafb07e245522c498abb418a5 100644
--- a/base/common/src/com/netscape/cms/client/system/SystemConfigClient.java
+++ b/base/common/src/com/netscape/cms/client/system/SystemConfigClient.java
@@ -19,13 +19,13 @@ package com.netscape.cms.client.system;
 
 import java.net.URISyntaxException;
 
+import com.netscape.certsrv.system.ConfigurationRequest;
+import com.netscape.certsrv.system.ConfigurationResponse;
+import com.netscape.certsrv.system.InstallToken;
+import com.netscape.certsrv.system.InstallTokenRequest;
+import com.netscape.certsrv.system.SystemConfigResource;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.PKIClient;
-import com.netscape.cms.servlet.csadmin.SystemConfigResource;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
 
 
 /**
diff --git a/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java b/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
index 7b4ccf3231d490be4a59a136d2b5989f912b6b0a..0854be3aae1e4591aa1b078a35094498ef7177b7 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/GroupMemberService.java
@@ -31,6 +31,7 @@ import org.jboss.resteasy.plugins.providers.atom.Link;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.base.SessionContext;
 import com.netscape.certsrv.common.OpDef;
 import com.netscape.certsrv.common.ScopeDef;
@@ -43,7 +44,6 @@ import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.user.UserResource;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.PKIService;
 
 /**
diff --git a/base/common/src/com/netscape/cms/servlet/admin/GroupService.java b/base/common/src/com/netscape/cms/servlet/admin/GroupService.java
index 9f2e32cd1900e7682b2f37389cc1bda2922547cd..b82df9a2fc8d293138ff1920eb4a7c34f7a145d7 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/GroupService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/GroupService.java
@@ -31,6 +31,7 @@ import org.jboss.resteasy.plugins.providers.atom.Link;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.common.OpDef;
 import com.netscape.certsrv.common.ScopeDef;
 import com.netscape.certsrv.group.GroupCollection;
@@ -40,7 +41,6 @@ import com.netscape.certsrv.logging.IAuditor;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
diff --git a/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java b/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
index fe60160561b6cf4be0ad9bf91df9e9b3245e9e8a..bd84f114186bafd4fda74e17571b10cdf923d932 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/SystemCertService.java
@@ -24,10 +24,11 @@ import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.cert.CertData;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.security.ITransportKeyUnit;
+import com.netscape.certsrv.system.SystemCertificateResource;
 import com.netscape.cms.servlet.base.PKIService;
-import com.netscape.cms.servlet.cert.model.CertData;
 
 /**
  * This is the class used to list, retrieve and modify system certificates for all Java subsystems.
diff --git a/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java b/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
index c2d4d6cfa43aac621679dd0685f1fe7a592b8579..16a584ff8f3f4888e722237096aea393944ca858 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/UserCertService.java
@@ -40,6 +40,7 @@ import org.mozilla.jss.crypto.InternalCertificate;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.ICertPrettyPrint;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.common.OpDef;
 import com.netscape.certsrv.common.ScopeDef;
 import com.netscape.certsrv.dbs.certdb.CertId;
@@ -50,7 +51,6 @@ import com.netscape.certsrv.user.UserCertData;
 import com.netscape.certsrv.user.UserCertResource;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.util.Cert;
 import com.netscape.cmsutil.util.Utils;
diff --git a/base/common/src/com/netscape/cms/servlet/admin/UserService.java b/base/common/src/com/netscape/cms/servlet/admin/UserService.java
index 6876197226954b32625f0e6a60e8ff07e9fba4d2..f28a8151f43386df22db0839aafd4ba7f90f8af5 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/UserService.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/UserService.java
@@ -33,6 +33,7 @@ import org.jboss.resteasy.plugins.providers.atom.Link;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.common.OpDef;
 import com.netscape.certsrv.common.ScopeDef;
 import com.netscape.certsrv.logging.IAuditor;
@@ -45,7 +46,6 @@ import com.netscape.certsrv.usrgrp.EUsrGrpException;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
diff --git a/base/common/src/com/netscape/cms/servlet/base/PKIService.java b/base/common/src/com/netscape/cms/servlet/base/PKIService.java
index a77846c68b7152aaaea888bdf96fc67b46396856..4034a75a312df2b70587ef5f396fa606afa580f3 100644
--- a/base/common/src/com/netscape/cms/servlet/base/PKIService.java
+++ b/base/common/src/com/netscape/cms/servlet/base/PKIService.java
@@ -36,9 +36,9 @@ import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.UriInfo;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.cert.CertData;
 import com.netscape.certsrv.logging.IAuditor;
 import com.netscape.certsrv.logging.ILogger;
-import com.netscape.cms.servlet.cert.model.CertData;
 
 /**
  * Base class for CMS RESTful resources
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java
index 2aab69b376a06f4eef89b0b3037f265862d92ca1..7a26e8e21482bc066184305d56eb953e25903696 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java
@@ -21,13 +21,13 @@ import java.util.Enumeration;
 import java.util.Locale;
 
 import com.netscape.certsrv.base.IArgBlock;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileInput;
+import com.netscape.certsrv.profile.ProfileInput;
 import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.profile.ProfileInputFactory;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class CertEnrollmentRequestFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/CertProcessor.java
index 2254a045874515813c1f933f55a5a1f5b3d59d36..4acc94d0720622ad9e0c340f764438fca44daaba 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertProcessor.java
@@ -30,6 +30,7 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.profile.EDeferException;
 import com.netscape.certsrv.profile.ERejectException;
@@ -37,12 +38,11 @@ import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileAuthenticator;
 import com.netscape.certsrv.profile.IProfileContext;
 import com.netscape.certsrv.profile.IProfileInput;
+import com.netscape.certsrv.profile.ProfileInput;
 import com.netscape.certsrv.request.INotify;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.servlet.processors.Processor;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class CertProcessor extends Processor {
 
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java b/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
index cac3371d0ac8fbeae29d6b69cfd6ae4d267e41b3..bcb19a70b6d7fb15f118d179041e20af899a50d1 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
@@ -32,21 +32,20 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.Nonces;
 import com.netscape.certsrv.ca.ICertificateAuthority;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileSubsystem;
+import com.netscape.certsrv.request.CMSRequestInfo;
+import com.netscape.certsrv.request.CMSRequestInfos;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.RequestId;
+import com.netscape.certsrv.request.RequestNotFoundException;
 import com.netscape.cms.servlet.processors.Processor;
 import com.netscape.cms.servlet.request.CMSRequestDAO;
-import com.netscape.cms.servlet.request.RequestNotFoundException;
-import com.netscape.cms.servlet.request.model.CMSRequestInfo;
-import com.netscape.cms.servlet.request.model.CMSRequestInfos;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
-
 
 /**
  * @author alee
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java
index 3320d946a75907162d07e739b4a574163f5ea411..fc16bd5f0851de9df14b8433d7331fac8b7351f2 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java
@@ -28,12 +28,13 @@ import netscape.security.x509.X509CertImpl;
 
 import org.apache.commons.lang.StringUtils;
 
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestResource;
+import com.netscape.certsrv.cert.CertResource;
 import com.netscape.certsrv.profile.IEnrollProfile;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestStatus;
-import com.netscape.cms.servlet.request.CertRequestResource;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
 
 public class CertRequestInfoFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
index 7a7c3e9f086dda2670b89751e67cfc107eb995ad..97611eb94b22a53d951d049caddf7d4d28bc42c7 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
@@ -27,11 +27,17 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.base.Nonces;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IPolicyDefault;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileInput;
 import com.netscape.certsrv.profile.IProfilePolicy;
+import com.netscape.certsrv.profile.PolicyConstraint;
+import com.netscape.certsrv.profile.PolicyDefault;
+import com.netscape.certsrv.profile.ProfileInput;
+import com.netscape.certsrv.profile.ProfilePolicy;
+import com.netscape.certsrv.profile.ProfilePolicySet;
 import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.cms.servlet.common.CMSRequest;
@@ -39,12 +45,6 @@ import com.netscape.cms.servlet.processors.Processor;
 import com.netscape.cms.servlet.profile.PolicyConstraintFactory;
 import com.netscape.cms.servlet.profile.PolicyDefaultFactory;
 import com.netscape.cms.servlet.profile.ProfileInputFactory;
-import com.netscape.cms.servlet.profile.model.PolicyConstraint;
-import com.netscape.cms.servlet.profile.model.PolicyDefault;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
-import com.netscape.cms.servlet.profile.model.ProfilePolicy;
-import com.netscape.cms.servlet.profile.model.ProfilePolicySet;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 
 public class CertReviewResponseFactory {
 
@@ -154,8 +154,8 @@ public class CertReviewResponseFactory {
                 String id = policyIds.nextElement();
                 CMS.debug("policyId:" + id);
                 IProfilePolicy policy = profile.getProfilePolicy(profileSetId, id);
-                com.netscape.cms.servlet.profile.model.ProfilePolicy dataPolicy =
-                        new com.netscape.cms.servlet.profile.model.ProfilePolicy();
+                com.netscape.certsrv.profile.ProfilePolicy dataPolicy =
+                        new com.netscape.certsrv.profile.ProfilePolicy();
 
                 //populate defaults
                 IPolicyDefault def = policy.getDefault();
diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertService.java b/base/common/src/com/netscape/cms/servlet/cert/CertService.java
index 0ccccf7bd893532fdf70baf95043c07ae6778882..e4a6fc9944919d5aa14946b5e7dc470de5124b94 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertService.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertService.java
@@ -43,9 +43,22 @@ import netscape.security.x509.X509CertImpl;
 import org.jboss.resteasy.plugins.providers.atom.Link;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.base.BadRequestException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.ICertPrettyPrint;
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.base.UnauthorizedException;
 import com.netscape.certsrv.ca.ICertificateAuthority;
+import com.netscape.certsrv.cert.CertData;
+import com.netscape.certsrv.cert.CertDataInfo;
+import com.netscape.certsrv.cert.CertDataInfos;
+import com.netscape.certsrv.cert.CertNotFoundException;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertResource;
+import com.netscape.certsrv.cert.CertRetrievalRequest;
+import com.netscape.certsrv.cert.CertRevokeRequest;
+import com.netscape.certsrv.cert.CertSearchRequest;
+import com.netscape.certsrv.cert.CertUnrevokeRequest;
 import com.netscape.certsrv.dbs.EDBRecordNotFoundException;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.dbs.certdb.ICertRecord;
@@ -53,19 +66,8 @@ import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
 import com.netscape.certsrv.logging.AuditFormat;
 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.PKIException;
 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;
-import com.netscape.cms.servlet.cert.model.CertRevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertSearchRequest;
-import com.netscape.cms.servlet.cert.model.CertUnrevokeRequest;
-import com.netscape.cms.servlet.cert.model.CertData;
 import com.netscape.cms.servlet.processors.Processor;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRetrievalRequest;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 import com.netscape.cmsutil.util.Utils;
 
diff --git a/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java b/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
index f74a6bbacdd2faffbdaea498abdef578f53ac501..f45947e8c7548da7186f2d1906de4c69af105780 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
@@ -49,6 +49,7 @@ import com.netscape.certsrv.authorization.EAuthzAccessDenied;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.base.Nonces;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.dbs.certdb.CertId;
@@ -65,7 +66,6 @@ import com.netscape.certsrv.usrgrp.Certificates;
 import com.netscape.certsrv.usrgrp.ICertUserLocator;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.CMSServlet;
 import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.common.CMSTemplate;
diff --git a/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java b/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
index 0f41d3e6a2472dbd49f7f984765a8ebccf076bc9..cca8381fdf733e7ae4285889c595b6012b273a5e 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
@@ -40,6 +40,7 @@ import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.authorization.EAuthzAccessDenied;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.dbs.certdb.CertId;
@@ -50,7 +51,6 @@ import com.netscape.certsrv.publish.IPublisherProcessor;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestStatus;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.CMSServlet;
 import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.common.CMSTemplate;
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 cfd3be05f17ea36ce5f9d950ee5d2c13445ece1b..911b30fa3abb9afae6e2df69f1de9c4794c23ebd 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java
@@ -30,15 +30,15 @@ import com.netscape.certsrv.base.BadRequestDataException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.SessionContext;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileAuthenticator;
 import com.netscape.certsrv.profile.IProfileContext;
 import com.netscape.certsrv.profile.IProfileInput;
+import com.netscape.certsrv.profile.ProfileInput;
 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.profile.model.ProfileInput;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
 
 public class EnrollmentProcessor extends CertProcessor {
 
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 2a9f1064858a60080d9dda2cf93b4f915bf724ce..a13a305b889251bc6fd71b614da9f439f031b3de 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java
@@ -35,6 +35,7 @@ import com.netscape.certsrv.base.BadRequestDataException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.SessionContext;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
 import com.netscape.certsrv.dbs.certdb.ICertRecord;
 import com.netscape.certsrv.profile.IEnrollProfile;
 import com.netscape.certsrv.profile.IProfile;
@@ -44,7 +45,6 @@ import com.netscape.certsrv.profile.IProfileInput;
 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.CertEnrollmentRequest;
 
 public class RenewalProcessor extends CertProcessor {
 
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 b1757f130cd023115e0a7e46d3e073a4b0fe376f..74a3183d6559cd8020ba2012d6812bee8758adf6 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java
@@ -36,6 +36,7 @@ import com.netscape.certsrv.base.BadRequestDataException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.profile.EDeferException;
 import com.netscape.certsrv.profile.EProfileException;
@@ -46,6 +47,10 @@ import com.netscape.certsrv.profile.IPolicyDefault;
 import com.netscape.certsrv.profile.IProfile;
 import com.netscape.certsrv.profile.IProfileOutput;
 import com.netscape.certsrv.profile.IProfilePolicy;
+import com.netscape.certsrv.profile.PolicyDefault;
+import com.netscape.certsrv.profile.ProfileAttribute;
+import com.netscape.certsrv.profile.ProfileOutput;
+import com.netscape.certsrv.profile.ProfilePolicySet;
 import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestId;
@@ -53,11 +58,6 @@ import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.profile.common.ProfilePolicy;
 import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.profile.ProfileOutputFactory;
-import com.netscape.cms.servlet.profile.model.PolicyDefault;
-import com.netscape.cms.servlet.profile.model.ProfileAttribute;
-import com.netscape.cms.servlet.profile.model.ProfileOutput;
-import com.netscape.cms.servlet.profile.model.ProfilePolicySet;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 
 public class RequestProcessor extends CertProcessor {
 
@@ -410,7 +410,7 @@ public class RequestProcessor extends CertProcessor {
         // put request policy defaults in a local hash
         HashMap<String, String> policyData = new HashMap<String,String>();
         for (ProfilePolicySet policySet: data.getPolicySets()) {
-            for (com.netscape.cms.servlet.profile.model.ProfilePolicy policy: policySet.getPolicies()) {
+            for (com.netscape.certsrv.profile.ProfilePolicy policy: policySet.getPolicies()) {
                 PolicyDefault def = policy.getDef();
                 List<ProfileAttribute> attrs = def.getAttributes();
                 for (ProfileAttribute attr: attrs) {
diff --git a/base/common/src/com/netscape/cms/servlet/cert/RevocationProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/RevocationProcessor.java
index 3f0fffbf4561c75860a52065b9b71ec1b96ed8dd..36d00459b9377866ba85c25416433c7cab29618b 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/RevocationProcessor.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/RevocationProcessor.java
@@ -35,8 +35,10 @@ import netscape.security.x509.RevokedCertImpl;
 import netscape.security.x509.X509CertImpl;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.base.BadRequestException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
+import com.netscape.certsrv.base.UnauthorizedException;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.dbs.certdb.CertId;
 import com.netscape.certsrv.dbs.certdb.ICertRecord;
@@ -48,8 +50,6 @@ 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.BadRequestException;
-import com.netscape.cms.servlet.base.UnauthorizedException;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
index 4c9caf5c10e7aa487c1272dbae6ee19d14727d44..4397251b5ca239e2306de83650d68427fcc5ef02 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -140,13 +140,13 @@ import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord;
 import com.netscape.certsrv.ldap.ILdapConnFactory;
 import com.netscape.certsrv.ocsp.IDefStore;
 import com.netscape.certsrv.ocsp.IOCSPAuthority;
+import com.netscape.certsrv.system.InstallToken;
+import com.netscape.certsrv.system.InstallTokenRequest;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.system.SystemConfigClient;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 import com.netscape.cmsutil.http.HttpClient;
 import com.netscape.cmsutil.http.HttpRequest;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
index b17cf1752c03e20bc5a1edc61e689c6da98b470a..c7560fbc4d38783ef554ebc7e599cd45145594c1 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
@@ -47,19 +47,20 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.ISecurityDomainSessionTable;
+import com.netscape.certsrv.base.PKIException;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
 import com.netscape.certsrv.ocsp.IOCSPAuthority;
+import com.netscape.certsrv.system.ConfigurationRequest;
+import com.netscape.certsrv.system.ConfigurationResponse;
+import com.netscape.certsrv.system.DomainInfo;
+import com.netscape.certsrv.system.InstallToken;
+import com.netscape.certsrv.system.InstallTokenRequest;
+import com.netscape.certsrv.system.SystemCertData;
+import com.netscape.certsrv.system.SystemConfigResource;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
 import com.netscape.certsrv.usrgrp.IUser;
-import com.netscape.cms.servlet.base.PKIException;
 import com.netscape.cms.servlet.base.PKIService;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.DomainInfo;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
-import com.netscape.cms.servlet.csadmin.model.SystemCertData;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 import com.netscape.cmsutil.util.Utils;
 
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java b/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java
index 2dffac22ee49b55a7bda6050ecbb273eeaf77221..e64bcb2dcae9b69da58c89174ccddc1629f1a985 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java
@@ -32,19 +32,20 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.keydb.IKeyRecord;
 import com.netscape.certsrv.dbs.keydb.IKeyRepository;
 import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.key.KeyArchivalRequest;
+import com.netscape.certsrv.key.KeyRecoveryRequest;
+import com.netscape.certsrv.key.KeyRequestInfo;
+import com.netscape.certsrv.key.KeyRequestInfos;
+import com.netscape.certsrv.key.KeyRequestResource;
+import com.netscape.certsrv.key.KeyResource;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.profile.IEnrollProfile;
+import com.netscape.certsrv.request.CMSRequestInfo;
+import com.netscape.certsrv.request.CMSRequestInfos;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.servlet.request.CMSRequestDAO;
-import com.netscape.cms.servlet.request.KeyRequestResource;
-import com.netscape.cms.servlet.request.model.CMSRequestInfo;
-import com.netscape.cms.servlet.request.model.CMSRequestInfos;
-import com.netscape.cms.servlet.request.model.KeyArchivalRequest;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
-import com.netscape.cms.servlet.request.model.KeyRequestInfos;
 
 /**
  * @author alee
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyService.java b/base/common/src/com/netscape/cms/servlet/key/KeyService.java
index 9657231135967b3306abba92078dade797c010ad..4db2fed0a4e35a5985cd9d22fef30c398e7a782d 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyService.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyService.java
@@ -36,17 +36,18 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.keydb.IKeyRecord;
 import com.netscape.certsrv.dbs.keydb.IKeyRepository;
 import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.key.KeyData;
+import com.netscape.certsrv.key.KeyDataInfo;
+import com.netscape.certsrv.key.KeyDataInfos;
+import com.netscape.certsrv.key.KeyRecoveryRequest;
+import com.netscape.certsrv.key.KeyRequestInfo;
+import com.netscape.certsrv.key.KeyResource;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 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.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;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
 /**
diff --git a/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java b/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java
index 5ceecd4a569b7ad71d0452c1b8aeef04c639af94..6c1d92a721362c9c3942b8cf0263654315928dbe 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java
@@ -21,9 +21,9 @@ import java.util.Enumeration;
 import java.util.Locale;
 
 import com.netscape.certsrv.profile.IPolicyConstraint;
+import com.netscape.certsrv.profile.PolicyConstraint;
+import com.netscape.certsrv.profile.PolicyConstraintValue;
 import com.netscape.certsrv.property.Descriptor;
-import com.netscape.cms.servlet.profile.model.PolicyConstraint;
-import com.netscape.cms.servlet.profile.model.PolicyConstraintValue;
 
 public class PolicyConstraintFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java b/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java
index 01c19936dbcefcc0d2bf5fa12975c2663b569af2..fe6b436ab12c57e8f087985c33d181689879ee0c 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java
@@ -22,11 +22,11 @@ import java.util.Locale;
 
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.profile.IPolicyDefault;
+import com.netscape.certsrv.profile.PolicyDefault;
+import com.netscape.certsrv.profile.ProfileAttribute;
 import com.netscape.certsrv.property.Descriptor;
 import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.request.IRequest;
-import com.netscape.cms.servlet.profile.model.PolicyDefault;
-import com.netscape.cms.servlet.profile.model.ProfileAttribute;
 
 public class PolicyDefaultFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java
index 1e9f4598ca3ada59f7fc457573e93c3aec888dc0..f5a9e7556b531390f1de91242112878d5d52151d 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java
@@ -6,8 +6,8 @@ import java.util.Locale;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IProfileInput;
+import com.netscape.certsrv.profile.ProfileInput;
 import com.netscape.certsrv.request.IRequest;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
 
 public class ProfileInputFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java
index e15875eff4a210b4cd3d33f654bfdf88e9863ebd..278acf488413124081c64ea2f5e08808025c3775 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java
@@ -22,10 +22,10 @@ import java.util.Locale;
 
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IProfileOutput;
+import com.netscape.certsrv.profile.ProfileAttribute;
+import com.netscape.certsrv.profile.ProfileOutput;
 import com.netscape.certsrv.property.Descriptor;
 import com.netscape.certsrv.request.IRequest;
-import com.netscape.cms.servlet.profile.model.ProfileAttribute;
-import com.netscape.cms.servlet.profile.model.ProfileOutput;
 
 public class ProfileOutputFactory {
 
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
index 56f75487447bec2870527d23bf08f99dacfe89cc..dcde4b0197778749692ba9bbb55e5093107a2349 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
@@ -29,10 +29,13 @@ import com.netscape.certsrv.authentication.EAuthException;
 import com.netscape.certsrv.authorization.EAuthzException;
 import com.netscape.certsrv.base.BadRequestDataException;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.profile.EDeferException;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.ERejectException;
+import com.netscape.certsrv.profile.ProfileAttribute;
+import com.netscape.certsrv.profile.ProfileOutput;
 import com.netscape.certsrv.property.Descriptor;
 import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.request.IRequest;
@@ -41,9 +44,6 @@ import com.netscape.certsrv.template.ArgSet;
 import com.netscape.certsrv.template.ArgString;
 import com.netscape.cms.servlet.cert.RequestProcessor;
 import com.netscape.cms.servlet.common.CMSRequest;
-import com.netscape.cms.servlet.profile.model.ProfileAttribute;
-import com.netscape.cms.servlet.profile.model.ProfileOutput;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 
 /**
  * This servlet approves profile-based request.
diff --git a/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
index 0c13b8bba5603d13c191eab48b7fc762732590f3..2b790b8cb5985ff7a590425e7efebeb6512fa30f 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
@@ -32,11 +32,13 @@ 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.certsrv.profile.ProfileData;
+import com.netscape.certsrv.profile.ProfileDataInfo;
+import com.netscape.certsrv.profile.ProfileDataInfos;
+import com.netscape.certsrv.profile.ProfileInput;
+import com.netscape.certsrv.profile.ProfileNotFoundException;
+import com.netscape.certsrv.profile.ProfileResource;
 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;
-import com.netscape.cms.servlet.profile.model.ProfileInput;
 
 /**
  * @author alee
diff --git a/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java b/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java
index 5d1df774db3740905c6b46eb3ce21b59993d9ebf..f7c9f7aae5ab7593c57bbeea6b70031ebc6558b8 100644
--- a/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java
+++ b/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java
@@ -28,14 +28,14 @@ import javax.ws.rs.core.UriInfo;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authority.IAuthority;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.Link;
+import com.netscape.certsrv.request.CMSRequestInfo;
+import com.netscape.certsrv.request.CMSRequestInfos;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestList;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.IRequestVirtualList;
 import com.netscape.certsrv.request.RequestId;
-import com.netscape.cms.servlet.base.model.Link;
-import com.netscape.cms.servlet.request.model.CMSRequestInfo;
-import com.netscape.cms.servlet.request.model.CMSRequestInfos;
 
 /**
  * @author alee
diff --git a/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
index 174b6d7fbcc24d12e29be7125ee616c962cc7d01..a8099003f2c4fee6025fc0db6e296eb95d4db137 100644
--- a/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
+++ b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java
@@ -26,20 +26,22 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.EAuthException;
 import com.netscape.certsrv.authorization.EAuthzException;
 import com.netscape.certsrv.base.BadRequestDataException;
+import com.netscape.certsrv.base.BadRequestException;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.cert.CertEnrollmentRequest;
+import com.netscape.certsrv.cert.CertRequestInfo;
+import com.netscape.certsrv.cert.CertRequestInfos;
+import com.netscape.certsrv.cert.CertRequestResource;
+import com.netscape.certsrv.cert.CertReviewResponse;
 import com.netscape.certsrv.profile.EDeferException;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.ERejectException;
 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.PKIException;
+import com.netscape.certsrv.request.RequestNotFoundException;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.cert.CertRequestDAO;
-import com.netscape.cms.servlet.request.model.CertEnrollmentRequest;
-import com.netscape.cms.servlet.request.model.CertRequestInfo;
-import com.netscape.cms.servlet.request.model.CertRequestInfos;
-import com.netscape.cms.servlet.request.model.CertReviewResponse;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
 /**
diff --git a/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
index 188bcb23c19e6de0e2e7112e71c6bd46d5f26216..775c0ed28aad51c7266cc4ddbf8cba67c56a67ef 100644
--- a/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
+++ b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java
@@ -24,14 +24,16 @@ import javax.ws.rs.core.Response;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.PKIException;
+import com.netscape.certsrv.key.KeyArchivalRequest;
+import com.netscape.certsrv.key.KeyRecoveryRequest;
+import com.netscape.certsrv.key.KeyRequestInfo;
+import com.netscape.certsrv.key.KeyRequestInfos;
+import com.netscape.certsrv.key.KeyRequestResource;
 import com.netscape.certsrv.request.RequestId;
-import com.netscape.cms.servlet.base.PKIException;
+import com.netscape.certsrv.request.RequestNotFoundException;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.key.KeyRequestDAO;
-import com.netscape.cms.servlet.request.model.KeyArchivalRequest;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
-import com.netscape.cms.servlet.request.model.KeyRequestInfos;
-import com.netscape.cms.servlet.request.model.KeyRecoveryRequest;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
 /**
diff --git a/base/deploy/src/scriptlets/pkijython.py b/base/deploy/src/scriptlets/pkijython.py
index c62847cb4034e71efc88bd681a38625bab01ebac..90b7327ba3cd01fb7ca6c0ac887ad7de7a4477a7 100644
--- a/base/deploy/src/scriptlets/pkijython.py
+++ b/base/deploy/src/scriptlets/pkijython.py
@@ -96,6 +96,7 @@ jarLoad.addFile("/usr/share/java/resteasy/resteasy-jaxrs.jar")
 jarLoad.addFile("/usr/share/java/resteasy/resteasy-jettison-provider.jar")
 jarLoad.addFile("/usr/share/java/scannotation.jar")
 #     PKI Jars
+jarLoad.addFile("/usr/share/java/pki/pki-certsrv.jar")
 jarLoad.addFile("/usr/share/java/pki/pki-cms.jar")
 jarLoad.addFile("/usr/share/java/pki/pki-cmsutil.jar")
 jarLoad.addFile("/usr/share/java/pki/pki-nsutil.jar")
@@ -141,9 +142,9 @@ from org.mozilla.jss.util import Password
 
 # PKI Java Imports
 from com.netscape.cms.client.system import SystemConfigClient
-from com.netscape.cms.servlet.csadmin.model import SystemCertData
-from com.netscape.cms.servlet.csadmin.model import ConfigurationRequest
-from com.netscape.cms.servlet.csadmin.model import ConfigurationResponse
+from com.netscape.certsrv.system import SystemCertData
+from com.netscape.certsrv.system import ConfigurationRequest
+from com.netscape.certsrv.system import ConfigurationResponse
 from com.netscape.cmsutil.util import Utils
 from netscape.security.x509 import X500Name
 
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 5a2013a6081cf196762a72d49ea35e833fd0c62e..7035803ab39c025e0d5f7715420a48049a88acf6 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
@@ -38,15 +38,15 @@ import org.mozilla.jss.crypto.SymmetricKey;
 import org.mozilla.jss.util.Password;
 
 import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.key.KeyData;
+import com.netscape.certsrv.key.KeyDataInfo;
+import com.netscape.certsrv.key.KeyRequestInfo;
+import com.netscape.certsrv.key.KeyRequestResource;
 import com.netscape.certsrv.request.RequestId;
+import com.netscape.certsrv.request.RequestNotFoundException;
 import com.netscape.cms.client.ClientConfig;
 import com.netscape.cms.client.kra.DRMClient;
 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;
-import com.netscape.cms.servlet.request.RequestNotFoundException;
-import com.netscape.cms.servlet.request.model.KeyRequestInfo;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 import com.netscape.cmsutil.util.Utils;
 
diff --git a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
index d8c0ece001adaa2ffaccd6332a5d8ad10a5b8df5..f972fe4b5d780410ff327544a0f797b5626a93f6 100644
--- a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
+++ b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
@@ -5,12 +5,12 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
+import com.netscape.certsrv.base.PKIException;
 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.PKIException;
 import com.netscape.cms.servlet.csadmin.SystemConfigService;
 import com.netscape.cms.servlet.key.KeyService;
 import com.netscape.cms.servlet.request.KeyRequestService;
diff --git a/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java b/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
index 527548381577a027ce81d4e3fb5cf7dfe5e11163..afe4ed6eadfa844c379005bb6ef8abee81c6b9df 100644
--- a/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
+++ b/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
@@ -54,13 +54,13 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.keydb.IKeyRecord;
 import com.netscape.certsrv.dbs.keydb.IKeyRepository;
+import com.netscape.certsrv.key.KeyRequestResource;
 import com.netscape.certsrv.kra.EKRAException;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IService;
 import com.netscape.certsrv.security.IStorageKeyUnit;
 import com.netscape.certsrv.security.ITransportKeyUnit;
-import com.netscape.cms.servlet.request.KeyRequestResource;
 import com.netscape.cmscore.dbs.KeyRecord;
 import com.netscape.cmsutil.util.Utils;
 
diff --git a/base/kra/src/com/netscape/kra/SecurityDataService.java b/base/kra/src/com/netscape/kra/SecurityDataService.java
index fa009dac927a633b33f03e2c197446a0da87315d..8a5886fa5e910313c7211be1e05fde1fc9f8ab78 100644
--- a/base/kra/src/com/netscape/kra/SecurityDataService.java
+++ b/base/kra/src/com/netscape/kra/SecurityDataService.java
@@ -19,6 +19,8 @@ package com.netscape.kra;
 
 import java.math.BigInteger;
 import org.mozilla.jss.crypto.SymmetricKey;
+
+import com.netscape.certsrv.key.KeyRequestResource;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.profile.IEnrollProfile;
@@ -30,7 +32,6 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.keydb.IKeyRecord;
 import com.netscape.certsrv.dbs.keydb.IKeyRepository;
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.cms.servlet.request.KeyRequestResource;
 import com.netscape.cmscore.dbs.KeyRecord;
 import com.netscape.cmsutil.util.Utils;
 
diff --git a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
index f78cf730dbaf188d17b3812f2d6cc33fdb246e32..498aa63ab248c4813c43de42d1cfcbc068ae827b 100644
--- a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
+++ b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
@@ -5,12 +5,12 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
+import com.netscape.certsrv.base.PKIException;
 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.PKIException;
 import com.netscape.cms.servlet.csadmin.SystemConfigService;
 
 public class OCSPApplication extends Application {
diff --git a/base/tks/src/com/netscape/tks/TKSApplication.java b/base/tks/src/com/netscape/tks/TKSApplication.java
index 68fbd7d357fdac536ceb5d4df634b48a3eab9406..a3d43f6611f8cf1e608b4870ff470ddcdb4597bf 100644
--- a/base/tks/src/com/netscape/tks/TKSApplication.java
+++ b/base/tks/src/com/netscape/tks/TKSApplication.java
@@ -5,12 +5,12 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
+import com.netscape.certsrv.base.PKIException;
 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.PKIException;
 import com.netscape.cms.servlet.csadmin.SystemConfigService;
 
 public class TKSApplication extends Application {
-- 
1.7.11.2

