- All Known Implementing Classes:
DialogHandlerAdapter
public interface DialogHandler
Specification for a component that handles native dialogs.
A dialog need not have a user-interface. For example, a login dialog could load credentials from a file or system properties and programmatically deal with the dialog.
Implementations should use MediaPlayerFactory.dialogs() to interact with the dialogs.
-
Method Summary
Modifier and TypeMethodDescriptionvoidPresent a cancel dialog.voiddisplayError(Long userData, String title, String text) Present an error dialog.voiddisplayLogin(Long userData, DialogId id, String title, String text, String defaultUsername, boolean askStore) Present a login dialog.voiddisplayProgress(Long userData, DialogId id, String title, String text, int indeterminate, float position, String cancel) Present a progress dialog.voiddisplayQuestion(Long userData, DialogId id, String title, String text, DialogQuestionType type, String cancel, String action1, String action2) Present a question dialog.voidupdateProgress(Long userData, DialogId id, float position, String text) Update a progress dialog.
-
Method Details
-
displayError
Present an error dialog.- Parameters:
userData- user datatitle- dialog titletext- error text
-
displayLogin
void displayLogin(Long userData, DialogId id, String title, String text, String defaultUsername, boolean askStore) Present a login dialog.- Parameters:
userData- user dataid- dialog id, used to interact with this dialogtitle- dialog titletext- login textdefaultUsername- default username to display in the dialogaskStore- iftrue, ask if the credentials should be stored
-
displayQuestion
void displayQuestion(Long userData, DialogId id, String title, String text, DialogQuestionType type, String cancel, String action1, String action2) Present a question dialog.- Parameters:
userData- user dataid- dialog id, used to interact with this dialogtitle- dialog titletext- question texttype- type of questioncancel- cancel action textaction1- first action textaction2- second action text
-
displayProgress
void displayProgress(Long userData, DialogId id, String title, String text, int indeterminate, float position, String cancel) Present a progress dialog.- Parameters:
userData- user dataid- dialog id, used to interact with this dialogtitle- dialog titletext- progress textindeterminate-trueif the progress is indeterminate;falseif it is notposition- percent completioncancel- cancel action text
-
cancel
Present a cancel dialog.- Parameters:
userData- user dataid- dialog id, used to interact with this dialog
-
updateProgress
Update a progress dialog.- Parameters:
userData- user dataid- dialog id, used to interact with this dialogposition- percent completiontext- progress text
-