01: package org.bouncycastle.jce;
02:
03: import java.security.cert.CertStoreParameters;
04: import java.util.Collection;
05:
06: public class MultiCertStoreParameters implements CertStoreParameters {
07: private Collection certStores;
08: private boolean searchAllStores;
09:
10: /**
11: * Create a parameters object which specifies searching of all the passed in stores.
12: *
13: * @param certStores CertStores making up the multi CertStore
14: */
15: public MultiCertStoreParameters(Collection certStores) {
16: this (certStores, true);
17: }
18:
19: /**
20: * Create a parameters object which can be to used to make a multi store made up
21: * of the passed in CertStores. If the searchAllStores parameter is false, any search on
22: * the multi-store will terminate as soon as a search query produces a result.
23: *
24: * @param certStores CertStores making up the multi CertStore
25: * @param searchAllStores true if all CertStores should be searched on request, false if a result
26: * should be returned on the first successful CertStore query.
27: */
28: public MultiCertStoreParameters(Collection certStores,
29: boolean searchAllStores) {
30: this .certStores = certStores;
31: this .searchAllStores = searchAllStores;
32: }
33:
34: public Collection getCertStores() {
35: return certStores;
36: }
37:
38: public boolean getSearchAllStores() {
39: return searchAllStores;
40: }
41:
42: public Object clone() {
43: return this;
44: }
45: }
|