org.apache.geronimo.security.ca
Class FileCertificateRequestStore

java.lang.Object
  extended by org.apache.geronimo.security.ca.FileCertificateRequestStore
All Implemented Interfaces:
GBeanLifecycle, CertificateRequestStore

public class FileCertificateRequestStore
extends Object
implements CertificateRequestStore, GBeanLifecycle

A certificate request store implementation using disk files.


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
FileCertificateRequestStore(ServerInfo serverInfo, URI directoryPath, Kernel kernel, AbstractName abstractName)
          Constructor
 
Method Summary
 boolean deleteRequest(String id)
          This method deletes a certificate request with the specified id.
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 String[] getAllRequestIds()
          This method returns the ids of all certificate requests in the store.
static GBeanInfo getGBeanInfo()
           
 String getRequest(String id)
          This method returns the certificate request text corresponding to a specified id.
 BigInteger getSerialNumberForRequest(String id)
          This method returns the Serial number of the certificate issued against the certificate request specified by the given id.
 String[] getVerificatonDueRequestIds()
          This method returns the ids of all certificate requests with verification due.
 String[] getVerifiedRequestIds()
          This method returns the ids of all certificate requests that are verified.
 void removeRequestStatus(String id, BigInteger sNo)
          This method removes the certificate request id from the status list.
 boolean setRequestFulfilled(String id, BigInteger sNo)
          This method sets the status of a certificate request as fulfilled.
 boolean setRequestVerified(String id)
          This method sets the status of the specifed certificate request as verified.
 String storeRequest(String id, String csr)
          This method stores the given certificate request under the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

FileCertificateRequestStore

public FileCertificateRequestStore(ServerInfo serverInfo,
                                   URI directoryPath,
                                   Kernel kernel,
                                   AbstractName abstractName)
Constructor

Method Detail

deleteRequest

public boolean deleteRequest(String id)
This method deletes a certificate request with the specified id.

Specified by:
deleteRequest in interface CertificateRequestStore
Parameters:
id - Id of the certificate request to be deleted.
Returns:
True if the request is deleted succssfully

getAllRequestIds

public String[] getAllRequestIds()
This method returns the ids of all certificate requests in the store.

Specified by:
getAllRequestIds in interface CertificateRequestStore

getVerificatonDueRequestIds

public String[] getVerificatonDueRequestIds()
This method returns the ids of all certificate requests with verification due.

Specified by:
getVerificatonDueRequestIds in interface CertificateRequestStore

getVerifiedRequestIds

public String[] getVerifiedRequestIds()
This method returns the ids of all certificate requests that are verified.

Specified by:
getVerifiedRequestIds in interface CertificateRequestStore

setRequestVerified

public boolean setRequestVerified(String id)
This method sets the status of the specifed certificate request as verified.

Specified by:
setRequestVerified in interface CertificateRequestStore
Parameters:
id - Id of the certificate request
Returns:
True if the status is set successfully.

setRequestFulfilled

public boolean setRequestFulfilled(String id,
                                   BigInteger sNo)
This method sets the status of a certificate request as fulfilled.

Specified by:
setRequestFulfilled in interface CertificateRequestStore
Parameters:
id - Id of the certificate request
sNo - Serial number of the certificate issued against the certificate request.
Returns:
True if the operation is successfull.

getRequest

public String getRequest(String id)
This method returns the certificate request text corresponding to a specified id.

Specified by:
getRequest in interface CertificateRequestStore
Parameters:
id - Id of the certificate request.

storeRequest

public String storeRequest(String id,
                           String csr)
This method stores the given certificate request under the given id. If a request with the id exists in the store, it will generate a new id and store the request under that id.

Specified by:
storeRequest in interface CertificateRequestStore
Parameters:
id - Id under which the certificate request is to be stored
csrText - Certificate Request text
Returns:
Id under which the certificate request is stored

getSerialNumberForRequest

public BigInteger getSerialNumberForRequest(String id)
This method returns the Serial number of the certificate issued against the certificate request specified by the given id.

Specified by:
getSerialNumberForRequest in interface CertificateRequestStore
Parameters:
id - Id of the certificate request
Returns:
Serial number of the certificate issued.

removeRequestStatus

public void removeRequestStatus(String id,
                                BigInteger sNo)
This method removes the certificate request id from the status list.

Specified by:
removeRequestStatus in interface CertificateRequestStore
Parameters:
id - Id of the certificate request to be removed.
sNo - Serial number of certificate issued against the certificate request whose Id is to be removed.

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.