KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > management > geronimo > CertificateRequestStore


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.geronimo.management.geronimo;
19
20 import java.math.BigInteger JavaDoc;
21
22 /**
23  * Management interface for dealing with a specific CertificateRequestStore
24  *
25  * @version $Rev: 476291 $ $Date: 2006-11-17 15:05:24 -0500 (Fri, 17 Nov 2006) $
26  */

27 public interface CertificateRequestStore {
28     /**
29      * This method returns the ids of all certificate requests in the store.
30      */

31     public String JavaDoc[] getAllRequestIds();
32
33     /**
34      * This method returns the ids of all certificate requests with verification due.
35      */

36     public String JavaDoc[] getVerificatonDueRequestIds();
37
38     /**
39      * This method returns the ids of all certificate requests that are verified.
40      */

41     public String JavaDoc[] getVerifiedRequestIds();
42
43     /**
44      * This method returns the certificate request text corresponding to a specified id.
45      * @param id Id of the certificate request.
46      */

47     public String JavaDoc getRequest(String JavaDoc id);
48
49     /**
50      * This method deletes a certificate request with the specified id.
51      * @param id Id of the certificate request to be deleted.
52      * @return True if the request is deleted succssfully
53      */

54     public boolean deleteRequest(String JavaDoc id);
55
56     /**
57      * This method stores the given certificate request under the given id. If a request with the id
58      * exists in the store, it will generate a new id and store the request under that id.
59      * @param id Id under which the certificate request is to be stored
60      * @param csrText Certificate Request text
61      * @return Id under which the certificate request is stored
62      */

63     public String JavaDoc storeRequest(String JavaDoc id, String JavaDoc csrText);
64
65     /**
66      * This method sets the status of the specifed certificate request as verified.
67      * @param id Id of the certificate request
68      * @return True if the status is set successfully.
69      */

70     public boolean setRequestVerified(String JavaDoc id);
71
72     /**
73      * This method sets the status of a certificate request as fulfilled.
74      * @param id Id of the certificate request
75      * @param sNo Serial number of the certificate issued against the certificate request.
76      * @return True if the operation is successfull.
77      */

78     public boolean setRequestFulfilled(String JavaDoc id, BigInteger JavaDoc sNo);
79
80     /**
81      * This method returns the Serial number of the certificate issued against the certificate request
82      * specified by the given id.
83      * @param id Id of the certificate request
84      * @return Serial number of the certificate issued.
85      * @return null if there is no such certificate request or the certificate request is not fulfilled.
86      */

87     public BigInteger JavaDoc getSerialNumberForRequest(String JavaDoc id);
88
89     /**
90      * This method removes the certificate request id from the status list.
91      * @param id Id of the certificate request to be removed.
92      * @param sNo Serial number of certificate issued against the certificate request whose Id is to be removed.
93      */

94     public void removeRequestStatus(String JavaDoc id, BigInteger JavaDoc sNo);
95 }
96
Popular Tags