From 8f378d7048a78b2960632499a690bd7de0242daf Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Thu, 1 Aug 2013 11:00:49 -0400
Subject: [PATCH] Reorganized PKIPrincipal.

The PKIPrincipal is in cmscore package but it's needed by the REST
services in cms package so the class has been moved into cms package.
---
 .../{cmscore/realm => certsrv/authentication}/PKIPrincipal.java        | 3 +--
 base/common/src/com/netscape/cms/authorization/ACLInterceptor.java     | 2 +-
 .../src/com/netscape/cms/authorization/AuthMethodInterceptor.java      | 2 +-
 base/common/src/com/netscape/cms/realm/PKIRealm.java                   | 2 +-
 base/common/src/com/netscape/cms/servlet/cert/CertService.java         | 2 +-
 base/common/src/com/netscape/cms/servlet/profile/ProfileService.java   | 2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)
 rename base/common/src/com/netscape/{cmscore/realm => certsrv/authentication}/PKIPrincipal.java (86%)

diff --git a/base/common/src/com/netscape/cmscore/realm/PKIPrincipal.java b/base/common/src/com/netscape/certsrv/authentication/PKIPrincipal.java
similarity index 86%
rename from base/common/src/com/netscape/cmscore/realm/PKIPrincipal.java
rename to base/common/src/com/netscape/certsrv/authentication/PKIPrincipal.java
index 6f806e3e9f79bf96e81317ec57832b9347cab0f5..ae506913494ec95fb82ef7f991da90b8f842f69b 100644
--- a/base/common/src/com/netscape/cmscore/realm/PKIPrincipal.java
+++ b/base/common/src/com/netscape/certsrv/authentication/PKIPrincipal.java
@@ -1,10 +1,9 @@
-package com.netscape.cmscore.realm;
+package com.netscape.certsrv.authentication;
 
 import java.util.List;
 
 import org.apache.catalina.realm.GenericPrincipal;
 
-import com.netscape.certsrv.authentication.IAuthToken;
 
 /**
  * @author Endi S. Dewata
diff --git a/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java b/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
index 53160bb8cfada5a8deb5cf61f425d883371b14fb..1cf0709950418409bf9d6bec5a85d983fd546882 100644
--- a/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
+++ b/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
@@ -39,12 +39,12 @@ import org.jboss.resteasy.spi.interception.PreProcessInterceptor;
 import com.netscape.certsrv.acls.ACLMapping;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.IAuthToken;
+import com.netscape.certsrv.authentication.PKIPrincipal;
 import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.authorization.EAuthzAccessDenied;
 import com.netscape.certsrv.authorization.IAuthzSubsystem;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.ForbiddenException;
-import com.netscape.cmscore.realm.PKIPrincipal;
 
 
 /**
diff --git a/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java b/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
index 8d7bcb3c65dae8529aa20abebee7cb4851d60bb9..61d10d01ec8f10d4a7a12535e4904ef07e4eedef 100644
--- a/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
+++ b/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
@@ -41,8 +41,8 @@ import org.jboss.resteasy.spi.interception.PreProcessInterceptor;
 import com.netscape.certsrv.authentication.AuthMethodMapping;
 import com.netscape.certsrv.authentication.AuthToken;
 import com.netscape.certsrv.authentication.IAuthToken;
+import com.netscape.certsrv.authentication.PKIPrincipal;
 import com.netscape.certsrv.base.ForbiddenException;
-import com.netscape.cmscore.realm.PKIPrincipal;
 
 
 /**
diff --git a/base/common/src/com/netscape/cms/realm/PKIRealm.java b/base/common/src/com/netscape/cms/realm/PKIRealm.java
index 10fab9ad0ab4f4640e137da4fea0a977a896de8e..bba57cfb0813e76efaeef8b6162a737cecac6387 100644
--- a/base/common/src/com/netscape/cms/realm/PKIRealm.java
+++ b/base/common/src/com/netscape/cms/realm/PKIRealm.java
@@ -14,6 +14,7 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.IAuthManager;
 import com.netscape.certsrv.authentication.IAuthSubsystem;
 import com.netscape.certsrv.authentication.IAuthToken;
+import com.netscape.certsrv.authentication.PKIPrincipal;
 import com.netscape.certsrv.usrgrp.EUsrGrpException;
 import com.netscape.certsrv.usrgrp.IGroup;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
@@ -21,7 +22,6 @@ import com.netscape.certsrv.usrgrp.IUser;
 import com.netscape.cms.authentication.ICertUserDBAuthentication;
 import com.netscape.cms.authentication.IPasswdJUserDBAuthentication;
 import com.netscape.cms.servlet.common.AuthCredentials;
-import com.netscape.cmscore.realm.PKIPrincipal;
 
 /**
  *  PKI Realm
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 7d07af8abed007fe9f689f846114cb9472037b6d..087cfc38caf47db1e95df458ec3e098d199fc1fe 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/CertService.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/CertService.java
@@ -46,6 +46,7 @@ import netscape.security.x509.X509Key;
 import org.jboss.resteasy.plugins.providers.atom.Link;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.authentication.PKIPrincipal;
 import com.netscape.certsrv.base.BadRequestException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.ICertPrettyPrint;
@@ -71,7 +72,6 @@ import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.cms.servlet.base.PKIService;
 import com.netscape.cms.servlet.processors.Processor;
-import com.netscape.cmscore.realm.PKIPrincipal;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 import com.netscape.cmsutil.util.Utils;
 
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 d4b23d95c0c59e430fd61564164d47e353ab8b0b..c242aab1d0a153321d8079e6343a59cdee04254a 100644
--- a/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
+++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileService.java
@@ -35,6 +35,7 @@ import javax.ws.rs.core.UriBuilder;
 import org.jboss.resteasy.plugins.providers.atom.Link;
 
 import com.netscape.certsrv.apps.CMS;
+import com.netscape.certsrv.authentication.PKIPrincipal;
 import com.netscape.certsrv.base.BadRequestException;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
@@ -64,7 +65,6 @@ import com.netscape.certsrv.property.EPropertyException;
 import com.netscape.certsrv.registry.IPluginInfo;
 import com.netscape.certsrv.registry.IPluginRegistry;
 import com.netscape.cms.servlet.base.PKIService;
-import com.netscape.cmscore.realm.PKIPrincipal;
 
 /**
  * @author alee
-- 
1.8.1.4

