01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
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: */package org.apache.geronimo.management.geronimo;
18:
19: import java.math.BigInteger;
20:
21: /**
22: * Management interface for dealing with a specific CertificateRequestStore
23: *
24: * @version $Rev: 476291 $ $Date: 2006-11-17 12:05:24 -0800 (Fri, 17 Nov 2006) $
25: */
26: public interface CertificateRequestStore {
27: /**
28: * This method returns the ids of all certificate requests in the store.
29: */
30: public String[] getAllRequestIds();
31:
32: /**
33: * This method returns the ids of all certificate requests with verification due.
34: */
35: public String[] getVerificatonDueRequestIds();
36:
37: /**
38: * This method returns the ids of all certificate requests that are verified.
39: */
40: public String[] getVerifiedRequestIds();
41:
42: /**
43: * This method returns the certificate request text corresponding to a specified id.
44: * @param id Id of the certificate request.
45: */
46: public String getRequest(String id);
47:
48: /**
49: * This method deletes a certificate request with the specified id.
50: * @param id Id of the certificate request to be deleted.
51: * @return True if the request is deleted succssfully
52: */
53: public boolean deleteRequest(String id);
54:
55: /**
56: * This method stores the given certificate request under the given id. If a request with the id
57: * exists in the store, it will generate a new id and store the request under that id.
58: * @param id Id under which the certificate request is to be stored
59: * @param csrText Certificate Request text
60: * @return Id under which the certificate request is stored
61: */
62: public String storeRequest(String id, String csrText);
63:
64: /**
65: * This method sets the status of the specifed certificate request as verified.
66: * @param id Id of the certificate request
67: * @return True if the status is set successfully.
68: */
69: public boolean setRequestVerified(String id);
70:
71: /**
72: * This method sets the status of a certificate request as fulfilled.
73: * @param id Id of the certificate request
74: * @param sNo Serial number of the certificate issued against the certificate request.
75: * @return True if the operation is successfull.
76: */
77: public boolean setRequestFulfilled(String id, BigInteger sNo);
78:
79: /**
80: * This method returns the Serial number of the certificate issued against the certificate request
81: * specified by the given id.
82: * @param id Id of the certificate request
83: * @return Serial number of the certificate issued.
84: * @return null if there is no such certificate request or the certificate request is not fulfilled.
85: */
86: public BigInteger getSerialNumberForRequest(String id);
87:
88: /**
89: * This method removes the certificate request id from the status list.
90: * @param id Id of the certificate request to be removed.
91: * @param sNo Serial number of certificate issued against the certificate request whose Id is to be removed.
92: */
93: public void removeRequestStatus(String id, BigInteger sNo);
94: }
|