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 String
FILENAME
the props file.protected boolean
m_Modified
whether the settings got modified.protected adams.core.Properties
m_Properties
the properties.protected static TrustStoreHelper
m_Singleton
the singleton.static String
TRUST_STORE_FILE
the trust store file.static String
TRUST_STORE_PASSWORD
the trust store password.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply()
Sets the system-wide properties of the trust store (when not pointing to dir).static TrustStoreHelper
getSingleton()
Returns the singleton.adams.core.io.PlaceholderFile
getTrustStoreFile()
Returns the trust store file.String
getTrustStoreFileName()
Returns the trust store file.adams.core.base.BasePassword
getTrustStorePassword()
Returns the trust store password.boolean
isModified()
Whether the settings got modified.void
reload()
Reloads the properties file.boolean
save()
Saves the settings in the user's home directory.void
setTrustStoreFile(String value)
Updates the trust store file.void
setTrustStorePassword(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
-
-