From 06360f9e500912cd0c79c1ece00169be63ddb9c6 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Mon, 28 Oct 2013 11:44:17 -0400
Subject: [PATCH] Renamed Processor to CAProcessor.

The Processor class depends on CertificateAuthority subsystem which
only exists on CA, so the class has been renamed to CAProcessor to
reflect the dependency.
---
 .../com/netscape/cms/servlet/admin/GroupMemberProcessor.java   |  4 ++--
 .../com/netscape/cms/servlet/admin/KRAConnectorProcessor.java  |  4 ++--
 .../cms/src/com/netscape/cms/servlet/cert/CertProcessor.java   |  4 ++--
 .../cms/src/com/netscape/cms/servlet/cert/CertRequestDAO.java  |  4 ++--
 .../netscape/cms/servlet/cert/CertReviewResponseFactory.java   |  4 ++--
 .../cms/src/com/netscape/cms/servlet/cert/CertService.java     |  4 ++--
 .../netscape/cms/servlet/csadmin/SecurityDomainProcessor.java  |  4 ++--
 .../servlet/processors/{Processor.java => CAProcessor.java}    |  4 ++--
 .../com/netscape/cms/servlet/profile/ProfileSubmitServlet.java | 10 +++++-----
 9 files changed, 21 insertions(+), 21 deletions(-)
 rename base/server/cms/src/com/netscape/cms/servlet/processors/{Processor.java => CAProcessor.java} (99%)

diff --git a/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
index 399b97d0c324d526958975a10228d097805ed534..cf8faaadf9c70753d84b2af9546ac204e4860843 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
@@ -48,12 +48,12 @@ 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.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 
 /**
  * @author Endi S. Dewata
  */
-public class GroupMemberProcessor extends Processor {
+public class GroupMemberProcessor extends CAProcessor {
 
     public final static int DEFAULT_SIZE = 20;
 
diff --git a/base/server/cms/src/com/netscape/cms/servlet/admin/KRAConnectorProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/admin/KRAConnectorProcessor.java
index 61536f3464f424a6a701a7a83ba2c923b06cfc78..69dff05e7eb23f49a5f0df2e9633f4aedc20d8c9 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/admin/KRAConnectorProcessor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/admin/KRAConnectorProcessor.java
@@ -32,12 +32,12 @@ import com.netscape.certsrv.ca.ICAService;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.connector.IConnector;
 import com.netscape.certsrv.system.KRAConnectorInfo;
-import com.netscape.cms.servlet.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 
 /**
  * @author Ade Lee
  */
-public class KRAConnectorProcessor extends Processor {
+public class KRAConnectorProcessor extends CAProcessor {
     private boolean connectorExists = false;
 
     // Connector constants
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java
index 8498f31c33baf2e723cd78c699507bcf5ede55e0..4cd54a25719bcd82728ef803f225bac481211584 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java
@@ -42,10 +42,10 @@ 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.processors.CAProcessor;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 
-public class CertProcessor extends Processor {
+public class CertProcessor extends CAProcessor {
 
     public CertProcessor(String id, Locale locale) throws EPropertyNotFound, EBaseException {
         super(id, locale);
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/CertRequestDAO.java b/base/server/cms/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
index e68896a9d988233afb39e5e6c2b2384f945ddac5..70433339fbd17f084139aad4065a5911d56e26e6 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/cert/CertRequestDAO.java
@@ -43,7 +43,7 @@ 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.processors.CAProcessor;
 import com.netscape.cms.servlet.request.CMSRequestDAO;
 
 /**
@@ -176,7 +176,7 @@ public class CertRequestDAO extends CMSRequestDAO {
             results = processor.processEnrollment(data, request);
         }
 
-        IRequest reqs[] = (IRequest[]) results.get(Processor.ARG_REQUESTS);
+        IRequest reqs[] = (IRequest[]) results.get(CAProcessor.ARG_REQUESTS);
         for (IRequest req : reqs) {
             CertRequestInfo info = CertRequestInfoFactory.create(req, uriInfo);
             ret.addRequest(info);
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java b/base/server/cms/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
index 6fcd941040abb56d4c910f1dedf668fcaee52795..cf0fafa51e397ac639ef6f4d163d807a4aa253fb 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java
@@ -40,7 +40,7 @@ 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;
-import com.netscape.cms.servlet.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 import com.netscape.cms.servlet.profile.PolicyConstraintFactory;
 import com.netscape.cms.servlet.profile.PolicyDefaultFactory;
 import com.netscape.cms.servlet.profile.ProfileInputFactory;
@@ -142,7 +142,7 @@ public class CertReviewResponseFactory {
         ret.setRequestId(ireq.getRequestId());
 
         if (noncesEnabled) {
-            ret.setNonce(req.getParameter(Processor.ARG_REQUEST_NONCE));
+            ret.setNonce(req.getParameter(CAProcessor.ARG_REQUEST_NONCE));
         }
 
         // populate profile policy values
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/CertService.java b/base/server/cms/src/com/netscape/cms/servlet/cert/CertService.java
index 6f46d9eb57f5bf7a0a8aee893d3a02a1079ad5c2..87912e60e3f915690bd3260d8f1833f69dcb2b9e 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/cert/CertService.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/cert/CertService.java
@@ -77,7 +77,7 @@ import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.cms.realm.PKIPrincipal;
 import com.netscape.cms.servlet.base.PKIService;
-import com.netscape.cms.servlet.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 import com.netscape.cmsutil.ldap.LDAPUtil;
 import com.netscape.cmsutil.util.Utils;
 
@@ -194,7 +194,7 @@ public class CertService extends PKIService implements CertResource {
         try {
             X509Certificate clientCert = null;
             try {
-                clientCert = Processor.getSSLClientCertificate(servletRequest);
+                clientCert = CAProcessor.getSSLClientCertificate(servletRequest);
             } catch (EBaseException e) {
                 // No client certificate, ignore.
             }
diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
index ddfa8fae11b31761a11956167372cb0cc9ada909..de83d20bf51b3d4f9efbd1ecf5540158c7b8da12 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
@@ -55,13 +55,13 @@ import com.netscape.certsrv.system.DomainInfo;
 import com.netscape.certsrv.system.InstallToken;
 import com.netscape.certsrv.system.SecurityDomainHost;
 import com.netscape.certsrv.system.SecurityDomainSubsystem;
-import com.netscape.cms.servlet.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 import com.netscape.cmsutil.xml.XMLObject;
 
 /**
  * @author Endi S. Dewata
  */
-public class SecurityDomainProcessor extends Processor {
+public class SecurityDomainProcessor extends CAProcessor {
 
     public final static String LOGGING_SIGNED_AUDIT_SECURITY_DOMAIN_UPDATE =
             "LOGGING_SIGNED_AUDIT_SECURITY_DOMAIN_UPDATE_1";
diff --git a/base/server/cms/src/com/netscape/cms/servlet/processors/Processor.java b/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java
similarity index 99%
rename from base/server/cms/src/com/netscape/cms/servlet/processors/Processor.java
rename to base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java
index 5a3b270638d31ddbe969f53602095f53bb227021..deddd2b4e68a16eeb10bed1c51065cde21ee4324 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/processors/Processor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java
@@ -72,7 +72,7 @@ import com.netscape.cms.servlet.common.CMSGateway;
 import com.netscape.cms.servlet.common.ServletUtils;
 import com.netscape.cmsutil.util.Utils;
 
-public class Processor {
+public class CAProcessor {
 
     public final static String ARG_AUTH_TOKEN = "auth_token";
     public final static String ARG_REQUEST_OWNER = "requestOwner";
@@ -160,7 +160,7 @@ public class Processor {
     protected ILogger signedAuditLogger = CMS.getSignedAuditLogger();
     protected LinkedHashSet<String> statEvents = new LinkedHashSet<String>();
 
-    public Processor(String id, Locale locale) throws EPropertyNotFound, EBaseException {
+    public CAProcessor(String id, Locale locale) throws EPropertyNotFound, EBaseException {
         IConfigStore cs = CMS.getConfigStore().getSubStore("processor." + id);
         this.locale = locale;
         this.profileID = cs.getString(PROFILE_ID, "").isEmpty() ? null : cs.getString(PROFILE_ID);
diff --git a/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java b/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
index 7b0813d715fa97c7db69f1e020a189c7d05ed6a3..0153ca6bb71d051b855de55fac7409dd663ff0ce 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
@@ -47,7 +47,7 @@ import com.netscape.certsrv.template.ArgSet;
 import com.netscape.cms.servlet.cert.EnrollmentProcessor;
 import com.netscape.cms.servlet.cert.RenewalProcessor;
 import com.netscape.cms.servlet.common.CMSRequest;
-import com.netscape.cms.servlet.processors.Processor;
+import com.netscape.cms.servlet.processors.CAProcessor;
 import com.netscape.cmsutil.util.Cert;
 import com.netscape.cmsutil.xml.XMLObject;
 
@@ -140,10 +140,10 @@ public class ProfileSubmitServlet extends ProfileServlet {
             return;
         }
 
-        IRequest[] reqs = (IRequest []) results.get(Processor.ARG_REQUESTS);
-        String errorCode = (String) results.get(Processor.ARG_ERROR_CODE);
-        String errorReason = (String) results.get(Processor.ARG_ERROR_REASON);
-        IProfile profile = (IProfile) results.get(Processor.ARG_PROFILE);
+        IRequest[] reqs = (IRequest []) results.get(CAProcessor.ARG_REQUESTS);
+        String errorCode = (String) results.get(CAProcessor.ARG_ERROR_CODE);
+        String errorReason = (String) results.get(CAProcessor.ARG_ERROR_REASON);
+        IProfile profile = (IProfile) results.get(CAProcessor.ARG_PROFILE);
         ArgSet args = new ArgSet();
 
         if (errorCode != null) {
-- 
1.8.1.4

