From 32150d3ee32f8ac27118af7c792794b538c78a2f Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Wed, 7 Dec 2011 16:58:12 -0500 Subject: Formatting Formatted project according to eclipse project settings --- .../certsrv/dbs/certdb/ICertificateRepository.java | 268 ++++++++++----------- 1 file changed, 125 insertions(+), 143 deletions(-) (limited to 'pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java') 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 b913a18c6..ab89bb2e4 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 @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.dbs.certdb; - import java.math.BigInteger; import java.security.cert.Certificate; import java.util.Date; @@ -32,157 +31,151 @@ import com.netscape.certsrv.base.MetaInfo; import com.netscape.certsrv.dbs.ModificationSet; import com.netscape.certsrv.dbs.repository.IRepository; - /** - * An interface represents a CMS certificate repository. - * It stores all the issued certificate. + * An interface represents a CMS certificate repository. It stores all the + * issued certificate. *

- * + * * @version $Revision$, $Date$ */ public interface ICertificateRepository extends IRepository { /** - * Adds a certificate record to the repository. Each certificate - * record contains four parts: certificate, meta-attributes, - * issue information and reovcation information. + * Adds a certificate record to the repository. Each certificate record + * contains four parts: certificate, meta-attributes, issue information and + * reovcation information. *

- * + * * @param record X.509 certificate - * @exception EBaseException failed to add new certificate to - * the repository + * @exception EBaseException failed to add new certificate to the repository */ - public void addCertificateRecord(ICertRecord record) - throws EBaseException; + public void addCertificateRecord(ICertRecord record) throws EBaseException; /** * Reads the certificate identified by the given serial no. - * + * * @param serialNo serial number of certificate * @return certificate * @exception EBaseException failed to retrieve certificate */ public X509CertImpl getX509Certificate(BigInteger serialNo) - throws EBaseException; + throws EBaseException; /** * Reads certificate from repository. - * + * * @param serialNo serial number of certificate * @return certificate record * @exception EBaseException failed to retrieve certificate */ public ICertRecord readCertificateRecord(BigInteger serialNo) - throws EBaseException; + throws EBaseException; /** * Sets certificate status update internal - * + * * @param requestRepo request repository * @param interval update interval * @param listenToCloneModifications enable listening to clone modifications */ - public void setCertStatusUpdateInterval(IRepository requestRepo, - int interval, - boolean listenToCloneModifications); + public void setCertStatusUpdateInterval(IRepository requestRepo, + int interval, boolean listenToCloneModifications); /** * Updates certificate status now. This is a blocking method. - * + * * @exception EBaseException failed to update */ public void updateCertStatus() throws EBaseException; /** * Modifies certificate record. - * + * * @param serialNo serial number of record * @param mods modifications * @exception EBaseException failed to modify */ public void modifyCertificateRecord(BigInteger serialNo, - ModificationSet mods) throws EBaseException; + ModificationSet mods) throws EBaseException; /** * Checks if the certificate exists in this repository. - * + * * @param serialNo serial number of certificate * @return true if it exists * @exception EBaseException failed to check */ public boolean containsCertificate(BigInteger serialNo) - throws EBaseException; + throws EBaseException; /** * Deletes certificate from this repository. - * + * * @param serialNo serial number of certificate * @exception EBaseException failed to delete */ public void deleteCertificateRecord(BigInteger serialNo) - throws EBaseException; + throws EBaseException; /** * Marks certificate as revoked. - * + * * @param id serial number * @param info revocation information * @exception EBaseException failed to mark */ public void markAsRevoked(BigInteger id, IRevocationInfo info) - throws EBaseException; + throws EBaseException; /** * Updates certificate status. - * + * * @param id serial number * @param status certificate status * @exception EBaseException failed to update status */ public void updateStatus(BigInteger id, String status) - throws EBaseException; + throws EBaseException; /** * Marks certificate as renewable. - * + * * @param record certificate record to modify * @exception EBaseException failed to update */ public void markCertificateAsRenewable(ICertRecord record) - throws EBaseException; + throws EBaseException; /** * Marks certificate as not renewable. - * + * * @param record certificate record to modify * @exception EBaseException failed to update */ public void markCertificateAsNotRenewable(ICertRecord record) - throws EBaseException; + throws EBaseException; /** * Marks certificate as renewed. - * + * * @param serialNo certificate record to modify * @exception EBaseException failed to update */ - public void markCertificateAsRenewed(String serialNo) - throws EBaseException; + public void markCertificateAsRenewed(String serialNo) throws EBaseException; /** * Marks certificate as renewed and notified. - * + * * @param serialNo certificate record to modify * @exception EBaseException failed to update */ public void markCertificateAsRenewalNotified(String serialNo) - throws EBaseException; + throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * Here is a list of filter - * attribute can be used: + * Finds a list of certificate records that satisifies the filter. Here is a + * list of filter attribute can be used: + * *

      *   certRecordId
      *   certMetaInfo
@@ -193,50 +186,48 @@ public interface ICertificateRepository extends IRepository {
      *   x509Cert.notAfter
      *   x509Cert.subject
      * 
- * The filter should follow RFC1558 LDAP filter syntax. - * For example, + * + * The filter should follow RFC1558 LDAP filter syntax. For example, + * *
      *   (&(certRecordId=5)(x509Cert.notBefore=934398398))
      * 
- * + * * @param filter search filter * @param maxSize max size to return * @return a list of certificates * @exception EBaseException failed to search */ public Enumeration searchCertificates(String filter, int maxSize) - throws EBaseException; + throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * + * Finds a list of certificate records that satisifies the filter. + * * @param filter search filter * @param maxSize max size to return * @param timeLimit timeout value * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration searchCertificates(String filter, int maxSize, - int timeLimit) throws EBaseException; + public Enumeration searchCertificates(String filter, int maxSize, + int timeLimit) throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * + * Finds a list of certificate records that satisifies the filter. + * * @param filter search filter * @param attrs selected attribute * @param pageSize page size * @return a list of certificates * @exception EBaseException failed to search */ - public ICertRecordList findCertRecordsInList(String filter, - String attrs[], int pageSize) throws EBaseException; + public ICertRecordList findCertRecordsInList(String filter, String attrs[], + int pageSize) throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * + * Finds a list of certificate records that satisifies the filter. + * * @param filter search filter * @param attrs selected attribute * @param sortKey key to use for sorting the returned elements @@ -244,14 +235,12 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public ICertRecordList findCertRecordsInList(String filter, - String attrs[], String sortKey, int pageSize) - throws EBaseException; + public ICertRecordList findCertRecordsInList(String filter, String attrs[], + String sortKey, int pageSize) throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * + * Finds a list of certificate records that satisifies the filter. + * * @param filter search filter * @param attrs selected attribute * @param jumpTo jump to index @@ -260,18 +249,16 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificates * @exception EBaseException failed to search */ - public ICertRecordList findCertRecordsInList(String filter, - String attrs[], String jumpTo, String sortKey, int pageSize) - throws EBaseException; + public ICertRecordList findCertRecordsInList(String filter, String attrs[], + String jumpTo, String sortKey, int pageSize) throws EBaseException; - public ICertRecordList findCertRecordsInList(String filter, - String attrs[], String jumpTo, boolean hardJumpTo, String sortKey, int pageSize) - throws EBaseException; + public ICertRecordList findCertRecordsInList(String filter, String attrs[], + String jumpTo, boolean hardJumpTo, String sortKey, int pageSize) + throws EBaseException; /** - * Finds a list of certificate records that satisifies - * the filter. - * + * Finds a list of certificate records that satisifies the filter. + * * @param filter search filter * @param attrs selected attribute * @param jumpTo jump to index @@ -281,120 +268,116 @@ public interface ICertificateRepository extends IRepository { * @exception EBaseException failed to search */ public ICertRecordList findCertRecordsInListRawJumpto(String filter, - String attrs[], String jumpTo, String sortKey, int pageSize) - throws EBaseException; + String attrs[], String jumpTo, String sortKey, int pageSize) + throws EBaseException; public static final int ALL_CERTS = 0; public static final int ALL_VALID_CERTS = 1; public static final int ALL_UNREVOKED_CERTS = 2; /** - * Gets all valid and unexpired certificates pertaining - * to a subject DN. - * - * @param subjectDN The distinguished name of the subject. - * @param validityType The type of certificatese to retrieve. + * Gets all valid and unexpired certificates pertaining to a subject DN. + * + * @param subjectDN The distinguished name of the subject. + * @param validityType The type of certificatese to retrieve. * @return An array of certificates. * @throws EBaseException on error. */ - public X509CertImpl[] getX509Certificates(String subjectDN, - int validityType) throws EBaseException; + public X509CertImpl[] getX509Certificates(String subjectDN, int validityType) + throws EBaseException; /** * Retrieves all the revoked certificates that have not expired. - * + * * @param asOfDate as of date * @return a list of revoked certificates * @exception EBaseException failed to retrieve */ public Enumeration getRevokedCertificates(Date asOfDate) - throws EBaseException; + throws EBaseException; /** - * Retrieves all revoked certificates including ones that have expired - * or that are not yet valid. - * + * Retrieves all revoked certificates including ones that have expired or + * that are not yet valid. + * * @return a list of revoked certificates * @exception EBaseException failed to search */ - public Enumeration getAllRevokedCertificates() - throws EBaseException; + public Enumeration getAllRevokedCertificates() throws EBaseException; /** * Retrieves all revoked but not expired certificates. - * + * * @return a list of revoked certificates * @exception EBaseException failed to search */ public Enumeration getAllRevokedNonExpiredCertificates() - throws EBaseException; + throws EBaseException; /** - * Finds all certificates given a filter. - * + * Finds all certificates given a filter. + * * @param filter search filter * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration findCertificates(String filter) - throws EBaseException; + public Enumeration findCertificates(String filter) throws EBaseException; /** * Finds all certificate records given a filter. - * + * * @param filter search filter * @return a list of certificates * @exception EBaseException failed to search */ - public Enumeration findCertRecords(String filter) - throws EBaseException; + public Enumeration findCertRecords(String filter) throws EBaseException; /** - * Gets Revoked certs orderes by noAfter date, jumps to records - * where notAfter date is greater than current. - * + * Gets Revoked certs orderes by noAfter date, jumps to records where + * notAfter date is greater than current. + * * @param date reference date * @param pageSize page size * @return a list of certificate records * @exception EBaseException failed to retrieve */ - public ICertRecordList getRevokedCertsByNotAfterDate(Date date, - int pageSize) throws EBaseException; + public ICertRecordList getRevokedCertsByNotAfterDate(Date date, int pageSize) + throws EBaseException; /** - * Gets Invalid certs orderes by noAfter date, jumps to records - * where notAfter date is greater than current. - * + * Gets Invalid certs orderes by noAfter date, jumps to records where + * notAfter date is greater than current. + * * @param date reference date * @param pageSize page size * @return a list of certificate records * @exception EBaseException failed to retrieve */ - public ICertRecordList getInvalidCertsByNotBeforeDate(Date date, - int pageSize) throws EBaseException; + public ICertRecordList getInvalidCertsByNotBeforeDate(Date date, + int pageSize) throws EBaseException; /** - * Gets valid certs orderes by noAfter date, jumps to records - * where notAfter date is greater than current. - * + * Gets valid certs orderes by noAfter date, jumps to records where notAfter + * date is greater than current. + * * @param date reference date * @param pageSize page size * @return a list of certificate records * @exception EBaseException failed to retrieve */ - public ICertRecordList getValidCertsByNotAfterDate(Date date, - int pageSize) throws EBaseException; + public ICertRecordList getValidCertsByNotAfterDate(Date date, int pageSize) + throws EBaseException; /** * Creates certificate record. - * + * * @param id serial number * @param cert certificate * @param meta meta information * @return certificate record */ - public ICertRecord createCertRecord(BigInteger id, - Certificate cert, MetaInfo meta); + public ICertRecord createCertRecord(BigInteger id, Certificate cert, + MetaInfo meta); /** * Finds certificate records. @@ -403,22 +386,21 @@ public interface ICertificateRepository extends IRepository { * @return a list of certificate records * @exception EBaseException failed to retrieve cert records */ - public Enumeration findCertRecs(String filter) - throws EBaseException; + public Enumeration findCertRecs(String filter) throws EBaseException; /** * Retrieves renewable certificates. - * + * * @param renewalTime renewal time * @return certificates * @exception EBaseException failed to retrieve */ public Hashtable getRenewableCertificates(String renewalTime) - throws EBaseException; + throws EBaseException; /** * Unmark a revoked certificates. - * + * * @param id serial number * @param info revocation information * @param revokedOn revocation date @@ -426,89 +408,89 @@ public interface ICertificateRepository extends IRepository { * @exception EBaseException failed to unmark */ public void unmarkRevoked(BigInteger id, IRevocationInfo info, - Date revokedOn, String revokedBy) - throws EBaseException; + Date revokedOn, String revokedBy) throws EBaseException; /** * Retrieves valid and not published certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getValidNotPublishedCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves expired and published certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getExpiredPublishedCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves revoked and published certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getRevokedPublishedCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves valid certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getValidCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves expired certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getExpiredCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves revoked certificates. - * + * * @param from starting serial number * @param to ending serial number * @return a list of certificates * @exception EBaseException failed to retrieve */ public Enumeration getRevokedCertificates(String from, String to) - throws EBaseException; + throws EBaseException; /** * Retrieves modified certificate records. - * + * * @param entry LDAPEntry with modified data */ - public void getModifications(LDAPEntry entry); + public void getModifications(LDAPEntry entry); /** * Removes certificate records with this repository. - * + * * @param beginS BigInteger with radix 16 * @param endS BigInteger with radix 16 */ - public void removeCertRecords(BigInteger beginS, BigInteger endS) throws EBaseException; + public void removeCertRecords(BigInteger beginS, BigInteger endS) + throws EBaseException; public void shutdown(); } -- cgit