Package adams.core.management
Class TrustStoreHelper
- java.lang.Object
-
- adams.core.management.TrustStoreHelper
-
public class TrustStoreHelper extends Object
Helper class for the global trust store.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILENAMEthe props file.protected booleanm_Modifiedwhether the settings got modified.protected adams.core.Propertiesm_Propertiesthe properties.protected static TrustStoreHelperm_Singletonthe singleton.static StringTRUST_STORE_FILEthe trust store file.static StringTRUST_STORE_PASSWORDthe trust store password.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply()Sets the system-wide properties of the trust store (when not pointing to dir).static TrustStoreHelpergetSingleton()Returns the singleton.adams.core.io.PlaceholderFilegetTrustStoreFile()Returns the trust store file.StringgetTrustStoreFileName()Returns the trust store file.adams.core.base.BasePasswordgetTrustStorePassword()Returns the trust store password.booleanisModified()Whether the settings got modified.voidreload()Reloads the properties file.booleansave()Saves the settings in the user's home directory.voidsetTrustStoreFile(String value)Updates the trust store file.voidsetTrustStorePassword(adams.core.base.BasePassword value)Updates the trust store password.
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the props file.- See Also:
- Constant Field Values
-
TRUST_STORE_FILE
public static final String TRUST_STORE_FILE
the trust store file.- See Also:
- Constant Field Values
-
TRUST_STORE_PASSWORD
public static final String TRUST_STORE_PASSWORD
the trust store password.- See Also:
- Constant Field Values
-
m_Singleton
protected static TrustStoreHelper m_Singleton
the singleton.
-
m_Properties
protected adams.core.Properties m_Properties
the properties.
-
m_Modified
protected boolean m_Modified
whether the settings got modified.
-
-
Method Detail
-
isModified
public boolean isModified()
Whether the settings got modified.- Returns:
- true if modified
-
getTrustStoreFileName
public String getTrustStoreFileName()
Returns the trust store file.- Returns:
- the file name, directory if no file defined
-
getTrustStoreFile
public adams.core.io.PlaceholderFile getTrustStoreFile()
Returns the trust store file.- Returns:
- the file name, directory if no file defined
-
setTrustStoreFile
public void setTrustStoreFile(String value)
Updates the trust store file.- Parameters:
value- the file
-
getTrustStorePassword
public adams.core.base.BasePassword getTrustStorePassword()
Returns the trust store password.- Returns:
- the password
-
setTrustStorePassword
public void setTrustStorePassword(adams.core.base.BasePassword value)
Updates the trust store password.- Parameters:
value- the password
-
reload
public void reload()
Reloads the properties file. Discards any unsaved settings.
-
save
public boolean save()
Saves the settings in the user's home directory.- Returns:
- true if successfully saved
-
apply
public void apply()
Sets the system-wide properties of the trust store (when not pointing to dir).
-
getSingleton
public static TrustStoreHelper getSingleton()
Returns the singleton.- Returns:
- the singleton
-
-