org.eclipse.emf.emfstore.client.provider
Interface ESKeyStoreManager

All Known Implementing Classes:
KeyStoreManager

public interface ESKeyStoreManager

The EMFStore key store manager that is used to managed certificates and their aliases.

Author:
mkoegel

Method Summary
 void addCertificate(String alias, InputStream certificate)
          Adds a certificate to the KeyStore.
 void addCertificate(String alias, String path)
          Adds a certificate to the KeyStore.
 boolean certificateExists(String alias)
          Checks whether a certificate for a given alias exists.
 String getDefaultCertificate()
          Returns the default certificate alias.
 void setDefaultCertificate(String defaultCertificate)
          Sets the alias for the default certificate.
 

Method Detail

addCertificate

void addCertificate(String alias,
                    String path)
                    throws ESCertificateException
Adds a certificate to the KeyStore.

Parameters:
alias - alias for the certificate
path - path to the certificate file
Throws:
ESCertificateException - if problems occur with storing, accessing or identifying the certificate

addCertificate

void addCertificate(String alias,
                    InputStream certificate)
                    throws ESCertificateException
Adds a certificate to the KeyStore.

Parameters:
alias - alias for the certificate
certificate - InputStream delivering the certificate. Stream is used by CertificateFactory.generateCertificate(InputStream).
Throws:
ESCertificateException - if problems occur with storing, accessing or identifying the certificate

getDefaultCertificate

String getDefaultCertificate()
Returns the default certificate alias.

Returns:
the alias of the default certificate

setDefaultCertificate

void setDefaultCertificate(String defaultCertificate)
Sets the alias for the default certificate.

Parameters:
defaultCertificate - certificate alias, use null to unset the currently set default certificate

certificateExists

boolean certificateExists(String alias)
                          throws ESCertificateException
Checks whether a certificate for a given alias exists.

Parameters:
alias - the alias which needs to be check
Returns:
true if a certificate with the given alias exists, false otherwise
Throws:
ESCertificateException - in case of failure


Copyright © 2015. All Rights Reserved.