public class MessageDialogPersistence
extends java.lang.Object
| Constructor and Description |
|---|
MessageDialogPersistence() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
getConfirmed(java.lang.String messageDialogId)
Get the confirmation status of a Yes/No message dialog given the
specified dialog ID, indicating whether the dialog has previously been
confirmed by the user and should not be displayed.
|
protected java.io.File |
getUserDirectory()
Get the user's home directory.
|
protected void |
handleError(java.lang.Exception e)
Handle an exception that occurred during persistence / depersistence of
message dialog settings.
|
boolean |
isHidden(java.lang.String messageDialogId)
Get whether the specified message dialog ID is hidden.
|
protected java.util.Map |
loadSettings()
Load settings from disk into a new map.
|
protected void |
saveSettings(java.util.Map settings)
Save settings from the specified map to disk.
|
void |
setConfirmed(java.lang.String messageDialogId,
java.lang.Boolean isConfirmed)
Set the confirmation status of a Yes/No message dialog given the
specified dialog ID, indicating whether the dialog should be displayed to
the user in the future.
|
void |
setHidden(java.lang.String messageDialogId,
boolean isHidden)
Set whether the specified message dialog ID is hidden.
|
public final boolean isHidden(java.lang.String messageDialogId)
getConfirmed(String).messageDialogId - the ID of an optional message dialog.public final void setHidden(java.lang.String messageDialogId,
boolean isHidden)
setConfirmed(String,Boolean).messageDialogId - the ID of an optional message dialog.public final java.lang.Boolean getConfirmed(java.lang.String messageDialogId)
The method returns Boolean.TRUE if the dialog has already been
confirmed and a "Yes" answer should be assumed, and it returns Boolean.FALSE if a "No" answer should be assumed; in either case, the
dialog should not be displayed. The method returns null if
the status is unknown and the confirmation dialog should be displayed.
messageDialogId - the ID of an optional Yes/No message dialogBoolean.TRUE, Boolean.FALSE,
or nullpublic final void setConfirmed(java.lang.String messageDialogId,
java.lang.Boolean isConfirmed)
Setting the confirmation status to Boolean.TRUE indicates the
dialog should no longer be displayed and a "Yes" answer should be
assumed, while Boolean.FALSE indicates a "No" answer should be
assumed. Setting the confirmation status to null clears any
previous status and indicates the dialog should be displayed in the
future.
messageDialogId - the ID of an optional Yes/No message dialogisConfirmed - either Boolean.TRUE,
Boolean.FALSE, or nullprotected java.util.Map loadSettings()
throws java.io.IOException
java.io.IOException - if an error occursprotected void saveSettings(java.util.Map settings)
throws java.io.IOException
java.io.IOException - if an error occursprotected java.io.File getUserDirectory()
protected void handleError(java.lang.Exception e)
e - the exception that occurred