@ThreadSafe public class CertificateFactory extends AbstractCertificateFactory implements IStorableCertificateFactory
AbstractCertificateFactory.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_FILENAME |
static String |
ATTR_SAVE_CHANGES_TO_FILE |
ATTR_PASSWORD, ATTR_TYPE, DEFAULT_KEY_STORE_TYPEm_aRWLockDEFAULT_SAVE_CHANGES_TO_FILE| Constructor and Description |
|---|
CertificateFactory() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFilename() |
boolean |
isSaveChangesToFile() |
protected void |
onChange()
Custom callback method that is invoked if something changes in the key
store.
|
void |
reinitKeyStore()
Reload the key store from the configured source.
|
void |
setFilename(String sFilename) |
void |
setSaveChangesToFile(boolean bSaveChangesToFile)
Change the behavior if all changes should trigger a saving to the original
file.
|
addCertificate, addPrivateKey, clearCertificates, createNewKeyStore, debugLog, equals, getAlias, getCertificate, getCertificate, getCertificates, getKeyStore, getKeyStoreType, getPassword, getPrivateKey, getUnifiedAlias, hashCode, initDynamicComponent, initEmptyKeyStore, internalGetCertificate, isDebugLogEnabled, load, removeCertificate, removeCertificate, save, setDebugLogEnaled, setKeyStore, setKeyStoreType, setKeyStoreType, setPasswordattrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPassword, load, load, load, save, save, save, setPassword, setPasswordgetCertificate, getCertificateOrNull, getPrivateKeyattrs, getName, getSession, initDynamicComponentpublic static final String ATTR_FILENAME
public static final String ATTR_SAVE_CHANGES_TO_FILE
public void setFilename(@Nullable String sFilename)
setFilename in interface IStorableCertificateFactory@Nullable public String getFilename()
getFilename in interface IStorableCertificateFactorypublic void setSaveChangesToFile(boolean bSaveChangesToFile)
IStorableCertificateFactoryIStorableCertificateFactory.DEFAULT_SAVE_CHANGES_TO_FILE.setSaveChangesToFile in interface IStorableCertificateFactorybSaveChangesToFile - true to enable auto-saving, false to
disable it.public boolean isSaveChangesToFile()
isSaveChangesToFile in interface IStorableCertificateFactorytrue if changes to the key store should be persisted
back to the original file, false if not. The default
value is IStorableCertificateFactory.DEFAULT_SAVE_CHANGES_TO_FILE.public void reinitKeyStore()
throws AS2Exception
IKeyStoreCertificateFactoryreinitKeyStore in interface IKeyStoreCertificateFactoryAS2Exception - in case of error@OverrideOnDemand
protected void onChange()
throws AS2Exception
onChange in class AbstractCertificateFactoryAS2Exception - In case saving fails.isSaveChangesToFile(),
setSaveChangesToFile(boolean)Copyright © 2013–2022 Philip Helger. All rights reserved.