summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/dbs
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java39
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java2
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java7
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java1
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/Repository.java29
5 files changed, 36 insertions, 42 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
index f9c4369a2..7eb470d55 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
@@ -27,7 +27,6 @@ import netscape.security.x509.RevokedCertificate;
import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.EDBException;
-import com.netscape.certsrv.dbs.IDBRegistry;
import com.netscape.certsrv.dbs.IDBSSession;
import com.netscape.certsrv.dbs.IDBSearchResults;
import com.netscape.certsrv.dbs.IDBSubsystem;
@@ -59,26 +58,24 @@ public class CRLRepository extends Repository implements ICRLRepository {
mBaseDN = baseDN;
mDBService = dbService;
- IDBRegistry reg = dbService.getRegistry();
-
- /**
- * String crlRecordOC[] = new String[1];
- * crlRecordOC[0] = Schema.LDAP_OC_CRL_RECORD;
- * reg.registerObjectClass(CRLIssuingPointRecord.class.getName(),
- * crlRecordOC);
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_ID, new
- * StringMapper(Schema.LDAP_ATTR_CRL_ID));
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL_NUMBER, new
- * BigIntegerMapper(Schema.LDAP_ATTR_CRL_NUMBER));
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL_SIZE, new
- * LongMapper(Schema.LDAP_ATTR_CRL_SIZE));
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_THIS_UPDATE, new
- * DateMapper(Schema.LDAP_ATTR_THIS_UPDATE));
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_NEXT_UPDATE, new
- * DateMapper(Schema.LDAP_ATTR_NEXT_UPDATE));
- * reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL, new
- * ByteArrayMapper(Schema.LDAP_ATTR_CRL));
- **/
+ /*
+ DBRegistry reg = dbService.getRegistry();
+ String crlRecordOC[] = new String[1];
+ crlRecordOC[0] = Schema.LDAP_OC_CRL_RECORD;
+ reg.registerObjectClass(CRLIssuingPointRecord.class.getName(), crlRecordOC);
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_ID,
+ new StringMapper(Schema.LDAP_ATTR_CRL_ID));
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL_NUMBER,
+ new BigIntegerMapper(Schema.LDAP_ATTR_CRL_NUMBER));
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL_SIZE,
+ new LongMapper(Schema.LDAP_ATTR_CRL_SIZE));
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_THIS_UPDATE,
+ new DateMapper(Schema.LDAP_ATTR_THIS_UPDATE));
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_NEXT_UPDATE,
+ new DateMapper(Schema.LDAP_ATTR_NEXT_UPDATE));
+ reg.registerAttribute(ICRLIssuingPointRecord.ATTR_CRL,
+ new ByteArrayMapper(Schema.LDAP_ATTR_CRL));
+ */
}
/**
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
index ae77330fc..0df563cad 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -1535,8 +1535,6 @@ public class CertificateRepository extends Repository
public ICertRecordList getInvalidCertsByNotBeforeDate(Date date, int pageSize)
throws EBaseException {
- Date rightNow = CMS.getCurrentDate();
-
ICertRecordList list = null;
IDBSSession s = mDBService.createSession();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
index 7201f61e7..ddc9f1874 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
@@ -263,6 +263,7 @@ public class DBSSession implements IDBSSession {
return search(base, filter, null);
}
+ @SuppressWarnings("unchecked")
public IDBSearchResults search(String base, String filter, int maxSize)
throws EBaseException {
try {
@@ -290,6 +291,7 @@ public class DBSSession implements IDBSSession {
}
}
+ @SuppressWarnings("unchecked")
public IDBSearchResults search(String base, String filter, int maxSize, int timeLimit)
throws EBaseException {
try {
@@ -322,6 +324,7 @@ public class DBSSession implements IDBSSession {
* Retrieves a list of object that satifies the given
* filter.
*/
+ @SuppressWarnings("unchecked")
public IDBSearchResults search(String base, String filter,
String attrs[]) throws EBaseException {
try {
@@ -458,13 +461,13 @@ public class DBSSession implements IDBSSession {
/**
* Retrieves a list of objects.
*/
- public IDBVirtualList<?> createVirtualList(String base, String filter,
+ public IDBVirtualList<Object> createVirtualList(String base, String filter,
String attrs[], String sortKey, int pageSize) throws EBaseException {
return new DBVirtualList<Object>(mDBSystem.getRegistry(), mConn, base,
filter, attrs, sortKey, pageSize);
}
- public IDBVirtualList<?> createVirtualList(String base, String filter,
+ public IDBVirtualList<Object> createVirtualList(String base, String filter,
String attrs[], String startFrom, String sortKey, int pageSize) throws EBaseException {
return new DBVirtualList<Object>(mDBSystem.getRegistry(), mConn, base,
filter, attrs, startFrom, sortKey, pageSize);
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
index 4adb17dd8..4bc5b6471 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
@@ -526,6 +526,7 @@ public class DBSubsystem implements IDBSubsystem {
* applications can use. Optionally, check the integrity
* of the database.
*/
+ @SuppressWarnings("unchecked")
public void init(ISubsystem owner, IConfigStore config)
throws EBaseException {
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java b/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
index b89f388ce..aadfb888a 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
@@ -23,7 +23,6 @@ import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.EDBException;
import com.netscape.certsrv.dbs.IDBObj;
-import com.netscape.certsrv.dbs.IDBRegistry;
import com.netscape.certsrv.dbs.IDBSSession;
import com.netscape.certsrv.dbs.IDBSubsystem;
import com.netscape.certsrv.dbs.Modification;
@@ -90,23 +89,20 @@ public abstract class Repository implements IRepository {
BI_INCREMENT = new BigInteger(Integer.toString(increment));
+ /*
// register schema
IDBRegistry reg = db.getRegistry();
-
- /**
- * if (!reg.isObjectClassRegistered(
- * RepositoryRecord.class.getName())) {
- * String repRecordOC[] = new String[2];
- * repRecordOC[0] = RepositorySchema.LDAP_OC_TOP;
- * repRecordOC[1] = RepositorySchema.LDAP_OC_REPOSITORY;
- * reg.registerObjectClass(
- * RepositoryRecord.class.getName(), repRecordOC);
- * }
- * if (!reg.isAttributeRegistered(RepositoryRecord.ATTR_SERIALNO)) {
- * reg.registerAttribute(RepositoryRecord.ATTR_SERIALNO,
- * new BigIntegerMapper(RepositorySchema.LDAP_ATTR_SERIALNO));
- * }
- **/
+ if (!reg.isObjectClassRegistered(RepositoryRecord.class.getName())) {
+ String repRecordOC[] = new String[2];
+ repRecordOC[0] = RepositorySchema.LDAP_OC_TOP;
+ repRecordOC[1] = RepositorySchema.LDAP_OC_REPOSITORY;
+ reg.registerObjectClass(RepositoryRecord.class.getName(), repRecordOC);
+ }
+ if (!reg.isAttributeRegistered(RepositoryRecord.ATTR_SERIALNO)) {
+ reg.registerAttribute(RepositoryRecord.ATTR_SERIALNO,
+ new BigIntegerMapper(RepositorySchema.LDAP_ATTR_SERIALNO));
+ }
+ */
}
/**
@@ -256,7 +252,6 @@ public abstract class Repository implements IRepository {
*/
private void initCache() throws EBaseException {
mNext = getSerialNumber();
- BigInteger serialConfig = new BigInteger("0");
mRadix = 10;
CMS.debug("Repository: in InitCache");