org.universAAL.support.utils.ui.mid
Class UtilUICaller

Package class diagram package UtilUICaller
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Caller
          extended by org.universAAL.middleware.ui.UICaller
              extended by org.universAAL.support.utils.ui.mid.UtilUICaller
Direct Known Subclasses:
UIExample, UIExample

public abstract class UtilUICaller
extends UICaller

This abstract class can be extended to create a UICaller that automatically registers its own Service Callee with the typical Main Menu "Start" service, that will be called by the Dialog Manager when the user requests the application form the Main Menu. It is exactly like extending the typical UICaller only that:

1: You have to implement method executeStartUI which will be called when the user requests interaction. The user is passed to the method.

2: Main Menu is automatically updated to include the Submit for this application. Until release 1.1.0 this is done with files "main_menu_*.txt" which are modified to include this application ID.

Author:
alfiva

Field Summary
static String UAAL_CONF_ROOT_DIR
          The root directory of the runtime configuration.
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
Constructor Summary
protected UtilUICaller(ModuleContext context, String namespace, String url, String title)
          Constructor to create a Simple UI Caller that handles first call interaction and addition to Main Menu.
 
Method Summary
 void close()
          Unregisters the Subscriber from the Context bus.
 void communicationChannelBroken()
          Method to be called when the communication of the UICaller with the IDialogManager is lost.
abstract  void executeStartUI(Resource resource)
          This method is called whenever the user selects your application submit from the Main Menu.
 
Methods inherited from class org.universAAL.middleware.ui.UICaller
abortDialog, adaptationParametersChanged, busDyingOut, dialogAborted, dialogSuspended, getMyID, handleReply, handleUIResponse, resumeDialog, sendUIRequest
 
Methods inherited from class org.universAAL.middleware.bus.member.BusMember
getType, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UAAL_CONF_ROOT_DIR

public static final String UAAL_CONF_ROOT_DIR
The root directory of the runtime configuration.

See Also:
Constant Field Values
Constructor Detail

UtilUICaller

protected UtilUICaller(ModuleContext context,
                       String namespace,
                       String url,
                       String title)
Constructor to create a Simple UI Caller that handles first call interaction and addition to Main Menu.

Parameters:
context - The universAAL module context.
namespace - Namespace to be used by the UI Caller references (only for initial UI request).
url - The URL of your company, for identificative purposes only.
title - Name of the application, which will appear in the Main Menu submit.
Method Detail

executeStartUI

public abstract void executeStartUI(Resource resource)
This method is called whenever the user selects your application submit from the Main Menu. You should initiate the interaction with the user here by publishing some kind of Dialog.

Parameters:
resource - The User which initiated the interaction. May be an instance of User, AssistedPerson or Caregiver.

communicationChannelBroken

public void communicationChannelBroken()
Description copied from class: UICaller
Method to be called when the communication of the 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).

Specified by:
communicationChannelBroken in class UICaller

close

public void close()
Description copied from class: BusMember
Unregisters the Subscriber from the Context bus.

Overrides:
close in class BusMember


Copyright © 2014 universAAL Consortium. All Rights Reserved.