public final class DialogManagerImpl extends UICaller implements IDialogManager
IDialogManager
.Modifier and Type | Field and Description |
---|---|
static String |
CALL_PREFIX
Prefix for all DM calls (Submits).
|
busResourceURI, owner, theBus
Modifier and Type | Method and Description |
---|---|
boolean |
checkNewDialog(UIRequest request)
This method is called by the UI bus and determines whether a dialog can
be shown directly (e.g.
|
void |
communicationChannelBroken()
Method to be called when the communication of the
UICaller with
the IDialogManager is lost. |
static void |
createInstance(ModuleContext mc)
Create a Singleton Instance.
|
void |
dialogAborted(String dialogID,
Resource data)
This method is called when an event on the UI bus occurs indicating that
a dialog was aborted.
|
void |
dialogFinished(String dialogID)
This method is called by the UI bus to inform the dialog manager that a
dialog was successfully finished.
|
static DialogManagerImpl |
getInstance()
Get the singleton instance.
|
static ModuleContext |
getModuleContext()
The module context reference.
|
static ServiceCaller |
getServiceCaller()
Get the
ServiceCaller for calling a service |
UIRequest |
getSuspendedDialog(String dialogID)
Get a suspended dialog.
|
UserDialogManager |
getUDM(String userURI)
Get the
UserDialogManager for a given userURI |
IUIPreferencesBuffer |
getUIPreferencesBuffer()
Get the
UIPreferencesBuffer . |
void |
handleUIResponse(UIResponse response)
Handle
UIResponse - that comes from UIHandler carrying
user input. |
static void |
stopDM()
Stop the Dialog Manager's instance
|
void |
suspendDialog(String dialogID)
Suspend a dialog.
|
void |
userLogIn(Resource user,
AbsLocation location)
A User has logged in at a location resend the appropriate dialog.
|
abortDialog, adaptationParametersChanged, busDyingOut, dialogSuspended, getMyID, handleReply, resumeDialog, sendUIRequest
close, getComment, getLabel, getType, getURI, setComment, setLabel
public static final String CALL_PREFIX
public boolean checkNewDialog(UIRequest request)
checkNewDialog
in interface IDialogManager
request
- The UI request containing a dialog.IDialogManager.checkNewDialog(UIRequest)
public void dialogFinished(String dialogID)
dialogFinished
in interface IDialogManager
dialogID
- ID of the dialog that is now finished.IDialogManager.dialogFinished(String)
public void userLogIn(Resource user, AbsLocation location)
userLogIn
in interface IDialogManager
user
- User
of a system. It is declared as Resource because
the type User is defined in the Profiling Ontology. The type
is not needed for for matchmaking Either.location
- Location
from which User
has logged in to the
systempublic UIRequest getSuspendedDialog(String dialogID)
getSuspendedDialog
in interface IDialogManager
dialogID
- ID of the dialog.UIRequest
, null if not found.public void suspendDialog(String dialogID)
suspendDialog
in interface IDialogManager
dialogID
- ID of the dialog.public void communicationChannelBroken()
UICaller
with
the IDialogManager
is lost. Any pending request might be resend
at this point. All affected pending dialogs will be
aborted
right after this
call (with null data).communicationChannelBroken
in class UICaller
public void dialogAborted(String dialogID, Resource data)
dialogAborted
in class UICaller
dialogID
- the dialogID of the dialog to be aborteddata
- the data collected up until abortion, it might be null if the
data could not be retrieved.public void handleUIResponse(UIResponse response)
UIResponse
- that comes from UIHandler
carrying
user input.handleUIResponse
in class UICaller
response
- the UIResponse
public UserDialogManager getUDM(String userURI)
UserDialogManager
for a given userURIuserURI
- public IUIPreferencesBuffer getUIPreferencesBuffer()
UIPreferencesBuffer
.public static void createInstance(ModuleContext mc)
mc
- the ModuleContext
needed to create the singleton
instance (for UICaller
).public static void stopDM()
public static DialogManagerImpl getInstance()
public static ServiceCaller getServiceCaller()
ServiceCaller
for calling a servicepublic static ModuleContext getModuleContext()
Copyright © 2018 universAAL Consortium. All rights reserved.