FileDocCategorySizeDatePackage
CertStoreCollectionSpi.javaAPI DocAzureus 3.0.3.42721Tue Jun 08 05:12:56 BST 2004org.bouncycastle.jce.provider

CertStoreCollectionSpi

public class CertStoreCollectionSpi extends CertStoreSpi

Fields Summary
private CollectionCertStoreParameters
params
Constructors Summary
public CertStoreCollectionSpi(CertStoreParameters params)

	    super(params);

	    if (!(params instanceof CollectionCertStoreParameters))
        {
            throw new InvalidAlgorithmParameterException( "org.bouncycastle.jce.provider.CertStoreCollectionSpi: parameter must be a CollectionCertStoreParameters object\n" +  params.toString() );
        }

	    this.params = (CollectionCertStoreParameters)params;
	
Methods Summary
public java.util.CollectionengineGetCRLs(java.security.cert.CRLSelector selector)

	    Set         col = new HashSet();
	    Iterator    iter = params.getCollection().iterator();

        if (selector == null)
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if (obj instanceof CRL)
                {
                    col.add(obj);
                }
            }
        }
        else
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if ((obj instanceof CRL) && selector.match((CRL)obj))
                {
                    col.add(obj);
                }
            }
        }
	    
	    return col;
	
public java.util.CollectionengineGetCertificates(java.security.cert.CertSelector selector)

	    Set         col = new HashSet();
	    Iterator    iter = params.getCollection().iterator();

        if (selector == null)
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if (obj instanceof Certificate)
                {
                    col.add(obj);
                }
            }
        }
        else
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if ((obj instanceof Certificate) && selector.match((Certificate)obj))
                {
                    col.add(obj);
                }
            }
        }
	    
	    return col;