From bb1d2c2f208f900d2d465cbd7f4d8fc713494337 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Wed, 11 Sep 2013 15:10:46 -0400
Subject: [PATCH] Fixed dependency issue on RenewableCertificateCollection.

The RenewableCertificateCollection class is in the server package but
it's used by ICertificateRepository in the base package, so the class
has been moved into the base package.
---
 .../certsrv/dbs/certdb/ICertificateRepository.java |  1 -
 .../dbs/certdb/RenewableCertificateCollection.java | 54 ++++++++++++++++++++++
 .../cmscore/dbs/CertificateRepository.java         | 33 +------------
 3 files changed, 55 insertions(+), 33 deletions(-)
 create mode 100644 base/common/src/com/netscape/certsrv/dbs/certdb/RenewableCertificateCollection.java

diff --git a/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
index 40d22d6148da0bb6bd8af0ed7f744dd0b7f78aca..066043b136afd0f5861c9a898d324b352b65a072 100644
--- a/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
+++ b/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
@@ -30,7 +30,6 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.MetaInfo;
 import com.netscape.certsrv.dbs.ModificationSet;
 import com.netscape.certsrv.dbs.repository.IRepository;
-import com.netscape.cmscore.dbs.CertificateRepository.RenewableCertificateCollection;
 
 /**
  * An interface represents a CMS certificate repository.
diff --git a/base/common/src/com/netscape/certsrv/dbs/certdb/RenewableCertificateCollection.java b/base/common/src/com/netscape/certsrv/dbs/certdb/RenewableCertificateCollection.java
new file mode 100644
index 0000000000000000000000000000000000000000..98ebbc567d16fbb4374daca972ecdc022357ca42
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/dbs/certdb/RenewableCertificateCollection.java
@@ -0,0 +1,54 @@
+// --- BEGIN COPYRIGHT BLOCK ---
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// (C) 2013 Red Hat, Inc.
+// All rights reserved.
+// --- END COPYRIGHT BLOCK ---
+package com.netscape.certsrv.dbs.certdb;
+
+import java.util.Vector;
+
+/**
+ * @author thomask
+ * @author kanda
+ * @version $Revision$, $Date$
+ */
+public class RenewableCertificateCollection {
+    Vector<Object> mToRenew = null;
+    Vector<Object> mToNotify = null;
+
+    public RenewableCertificateCollection() {
+    }
+
+    public Vector<Object> getRenewable() {
+        return mToRenew;
+    }
+
+    public Vector<Object> getNotifiable() {
+        return mToNotify;
+    }
+
+    public void addCertificate(String renewalFlag, Object o) {
+        if (renewalFlag.equals(ICertRecord.AUTO_RENEWAL_ENABLED)) {
+            if (mToRenew == null)
+                mToRenew = new Vector<Object>();
+            mToRenew.addElement(o);
+        }
+        if (renewalFlag.equals(ICertRecord.AUTO_RENEWAL_DISABLED)) {
+            if (mToNotify == null)
+                mToNotify = new Vector<Object>();
+            mToNotify.addElement(o);
+        }
+    }
+}
\ No newline at end of file
diff --git a/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java b/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
index 400ad1e4e9fc2cb2aa67c22ee13522eb2381fb7f..7d626b93d1e4e266c93dc9da31239eeb06133732 100644
--- a/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -58,6 +58,7 @@ import com.netscape.certsrv.dbs.certdb.ICertRecord;
 import com.netscape.certsrv.dbs.certdb.ICertRecordList;
 import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
 import com.netscape.certsrv.dbs.certdb.IRevocationInfo;
+import com.netscape.certsrv.dbs.certdb.RenewableCertificateCollection;
 import com.netscape.certsrv.dbs.repository.IRepository;
 import com.netscape.certsrv.dbs.repository.IRepositoryRecord;
 import com.netscape.certsrv.logging.ILogger;
@@ -1403,38 +1404,6 @@ public class CertificateRepository extends Repository
         }
     }
 
-    /**
-     * temp solution...
-     */
-    public static class RenewableCertificateCollection {
-        Vector<Object> mToRenew = null;
-        Vector<Object> mToNotify = null;
-
-        public RenewableCertificateCollection() {
-        }
-
-        public Vector<Object> getRenewable() {
-            return mToRenew;
-        }
-
-        public Vector<Object> getNotifiable() {
-            return mToNotify;
-        }
-
-        public void addCertificate(String renewalFlag, Object o) {
-            if (renewalFlag.equals(CertRecord.AUTO_RENEWAL_ENABLED)) {
-                if (mToRenew == null)
-                    mToRenew = new Vector<Object>();
-                mToRenew.addElement(o);
-            }
-            if (renewalFlag.equals(CertRecord.AUTO_RENEWAL_DISABLED)) {
-                if (mToNotify == null)
-                    mToNotify = new Vector<Object>();
-                mToNotify.addElement(o);
-            }
-        }
-    }
-
     public Hashtable<String, RenewableCertificateCollection> getRenewableCertificates(String renewalTime)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-- 
1.8.1.4

