Package com.helger.as2lib.cert
Interface IStorableCertificateFactory
-
- All Superinterfaces:
ICertificateFactory
,IDynamicComponent
- All Known Implementing Classes:
CertificateFactory
public interface IStorableCertificateFactory extends ICertificateFactory
Base interface for a certificate factory that can store to a file.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_SAVE_CHANGES_TO_FILE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getFilename()
char[]
getPassword()
boolean
isSaveChangesToFile()
default void
load()
Shortcut forload (getFilename (), getPassword ());
void
load(InputStream aIS, char[] aPassword)
default void
load(String sFilename, char[] aPassword)
default void
save()
Shortcut forsave (getFilename (), getPassword ());
void
save(OutputStream aOS, char[] aPassword)
default void
save(String sFilename, char[] aPassword)
void
setFilename(String sFilename)
default void
setPassword(char[] aPassword)
void
setPassword(String sPassword)
void
setSaveChangesToFile(boolean bSaveChangesToFile)
Change the behavior if all changes should trigger a saving to the original file.-
Methods inherited from interface com.helger.as2lib.cert.ICertificateFactory
getCertificate, getCertificateOrNull, getPrivateKey
-
Methods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession, initDynamicComponent
-
-
-
-
Field Detail
-
DEFAULT_SAVE_CHANGES_TO_FILE
static final boolean DEFAULT_SAVE_CHANGES_TO_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPassword
default void setPassword(@Nonnull char[] aPassword)
-
getPassword
@Nullable char[] getPassword()
-
setSaveChangesToFile
void setSaveChangesToFile(boolean bSaveChangesToFile)
Change the behavior if all changes should trigger a saving to the original file. The default value isDEFAULT_SAVE_CHANGES_TO_FILE
.- Parameters:
bSaveChangesToFile
-true
to enable auto-saving,false
to disable it.
-
isSaveChangesToFile
boolean isSaveChangesToFile()
- Returns:
true
if changes to the key store should be persisted back to the original file,false
if not. The default value isDEFAULT_SAVE_CHANGES_TO_FILE
.
-
load
default void load() throws AS2Exception
Shortcut forload (getFilename (), getPassword ());
- Throws:
AS2Exception
- In case of an internal error
-
load
default void load(@Nonnull String sFilename, @Nonnull char[] aPassword) throws AS2Exception
- Throws:
AS2Exception
-
load
void load(@Nonnull InputStream aIS, @Nonnull char[] aPassword) throws AS2Exception
- Throws:
AS2Exception
-
save
default void save() throws AS2Exception
Shortcut forsave (getFilename (), getPassword ());
- Throws:
AS2Exception
- In case of an internal error
-
save
default void save(@Nonnull String sFilename, @Nonnull char[] aPassword) throws AS2Exception
- Throws:
AS2Exception
-
save
void save(@Nonnull OutputStream aOS, @Nonnull char[] aPassword) throws AS2Exception
- Throws:
AS2Exception
-
-