diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-02-06 15:44:34 -0600 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-02-14 16:32:25 -0600 |
commit | d5c6e6c69e678a79f9e8cd312e6007ad88026a36 (patch) | |
tree | 2e5934f2ff9aeb3b5014808799f2862ee262a723 /pki/base/common/src/com/netscape/certsrv | |
parent | a4979af45554d97190180a038a4b438e3161d609 (diff) | |
download | pki-d5c6e6c69e678a79f9e8cd312e6007ad88026a36.tar.gz pki-d5c6e6c69e678a79f9e8cd312e6007ad88026a36.tar.xz pki-d5c6e6c69e678a79f9e8cd312e6007ad88026a36.zip |
Added generics (part 4).
This patch brings down the warnings from 3427 to 2917.
Ticket #2
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv')
9 files changed, 29 insertions, 24 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java index 448b851e7..2c1b7c3ea 100644 --- a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java +++ b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java @@ -233,7 +233,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable { Enumeration<String> e = permissions(); for (; e.hasMoreElements();) { - String p = (String) e.nextElement(); + String p = e.nextElement(); entry += p; if (e.hasMoreElements()) diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java index 376b4e91a..06e7d522a 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java @@ -34,7 +34,7 @@ public interface IConfigStoreEventListener { * @exception EBaseException failed to validate */ public void validateConfigParams(String action, - Hashtable params) throws EBaseException; + Hashtable<String, String> params) throws EBaseException; /** * Validates the config store parameters that changed @@ -44,5 +44,5 @@ public interface IConfigStoreEventListener { * @exception EBaseException failed to validate */ public void doConfigParams(String action, - Hashtable params) throws EBaseException; + Hashtable<String, String> params) throws EBaseException; } diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java index 60f867368..2e9e00f60 100644 --- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java +++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java @@ -30,6 +30,7 @@ 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. @@ -205,7 +206,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration searchCertificates(String filter, int maxSize) + public Enumeration<Object> searchCertificates(String filter, int maxSize) throws EBaseException; /** @@ -218,7 +219,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration searchCertificates(String filter, int maxSize, + public Enumeration<ICertRecord> searchCertificates(String filter, int maxSize, int timeLimit) throws EBaseException; /** @@ -308,7 +309,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of revoked certificates * @exception EBaseException failed to retrieve */ - public Enumeration getRevokedCertificates(Date asOfDate) + public Enumeration<ICertRecord> getRevokedCertificates(Date asOfDate) throws EBaseException; /** @@ -318,7 +319,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of revoked certificates * @exception EBaseException failed to search */ - public Enumeration getAllRevokedCertificates() + public Enumeration<ICertRecord> getAllRevokedCertificates() throws EBaseException; /** @@ -327,7 +328,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of revoked certificates * @exception EBaseException failed to search */ - public Enumeration getAllRevokedNonExpiredCertificates() + public Enumeration<ICertRecord> getAllRevokedNonExpiredCertificates() throws EBaseException; /** @@ -337,7 +338,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration findCertificates(String filter) + public Enumeration<X509CertImpl> findCertificates(String filter) throws EBaseException; /** @@ -347,7 +348,7 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration findCertRecords(String filter) + public Enumeration<ICertRecord> findCertRecords(String filter) throws EBaseException; /** @@ -414,7 +415,7 @@ public interface ICertificateRepository extends IRepository { * @return certificates * @exception EBaseException failed to retrieve */ - public Hashtable getRenewableCertificates(String renewalTime) + public Hashtable<String, RenewableCertificateCollection> getRenewableCertificates(String renewalTime) throws EBaseException; /** diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java index 3fb40b26d..806a2cb19 100644 --- a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java +++ b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java @@ -22,6 +22,8 @@ import java.util.Date; import java.util.Hashtable; import java.util.Vector; +import netscape.security.x509.RevokedCertificate; + import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.dbs.ModificationSet; @@ -109,7 +111,9 @@ public interface ICRLRepository { */ public void updateCRLIssuingPointRecord(String id, byte[] newCRL, Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize, - Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts) + Hashtable<BigInteger, RevokedCertificate> revokedCerts, + Hashtable<BigInteger, RevokedCertificate> unrevokedCerts, + Hashtable<BigInteger, RevokedCertificate> expiredCerts) throws EBaseException; /** @@ -120,7 +124,7 @@ public interface ICRLRepository { * @param unrevokedCerts list of released from hold certificates * @exception EBaseException failed to update issuing point record */ - public void updateRevokedCerts(String id, Hashtable revokedCerts, Hashtable unrevokedCerts) + public void updateRevokedCerts(String id, Hashtable<BigInteger, RevokedCertificate> revokedCerts, Hashtable<BigInteger, RevokedCertificate> unrevokedCerts) throws EBaseException; /** @@ -130,7 +134,7 @@ public interface ICRLRepository { * @param expiredCerts list of expired certificates * @exception EBaseException failed to update issuing point record */ - public void updateExpiredCerts(String id, Hashtable expiredCerts) + public void updateExpiredCerts(String id, Hashtable<BigInteger, RevokedCertificate> expiredCerts) throws EBaseException; /** @@ -144,9 +148,9 @@ public interface ICRLRepository { * @exception EBaseException failed to update issuing point record */ public void updateCRLCache(String id, Long crlSize, - Hashtable revokedCerts, - Hashtable unrevokedCerts, - Hashtable expiredCerts) + Hashtable<BigInteger, RevokedCertificate> revokedCerts, + Hashtable<BigInteger, RevokedCertificate> unrevokedCerts, + Hashtable<BigInteger, RevokedCertificate> expiredCerts) throws EBaseException; /** diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java index ca1e2c8aa..627844286 100644 --- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java +++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java @@ -97,7 +97,7 @@ public interface IKeyRepository extends IRepository { * @return a list of private key records * @exception EBaseException failed to search keys */ - public Enumeration searchKeys(String filter, int maxSize) + public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize) throws EBaseException; /** @@ -109,7 +109,7 @@ public interface IKeyRepository extends IRepository { * @return a list of private key records * @exception EBaseException failed to search keys */ - public Enumeration searchKeys(String filter, int maxSize, int timeLimt) + public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize, int timeLimt) throws EBaseException; /** diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java index 7123de303..ee4c76a08 100644 --- a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java +++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java @@ -110,7 +110,7 @@ public interface IDefStore extends IOCSPStore { * @return Enumeration a list of the CRL issuing points * @exception EBaseException occurs when no CRL issuing point exists */ - public Enumeration<Object> searchAllCRLIssuingPointRecord( + public Enumeration<ICRLIssuingPointRecord> searchAllCRLIssuingPointRecord( int maxSize) throws EBaseException; @@ -124,7 +124,7 @@ public interface IDefStore extends IOCSPStore { * @return Enumeration a list of the CRL issuing points * @exception EBaseException occurs when no CRL issuing point exists */ - public Enumeration searchCRLIssuingPointRecord(String filter, + public Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(String filter, int maxSize) throws EBaseException; diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java index c1af492b8..911d4e132 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java @@ -103,7 +103,7 @@ public interface IPublishRuleSet { * * @return An enumeration of publishing rules. */ - Enumeration getRules(); + Enumeration<ILdapRule> getRules(); /** * Apply publishing rules on a request. diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java index e207c0014..5f265941a 100644 --- a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java +++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java @@ -27,7 +27,7 @@ import java.util.Enumeration; * @version $Revision$, $Date$ */ public interface IRequestList - extends Enumeration { + extends Enumeration<RequestId> { /** * Gets the next RequestId from this list. null is diff --git a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java index 336bf57ad..5f3b0ec48 100644 --- a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java +++ b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java @@ -59,7 +59,7 @@ public interface IStorageKeyUnit extends IEncryptionUnit { * * @return a list of string-based agent identifiers */ - public Enumeration getAgentIdentifiers(); + public Enumeration<String> getAgentIdentifiers(); /** * Changes agent password. |