org.universAAL.ui.handler.gui.swing
Class Handler

Package class diagram package Handler
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Callee
          extended by org.universAAL.middleware.ui.UIHandler
              extended by org.universAAL.ui.handler.gui.swing.Handler

public final class Handler
extends UIHandler

Main uAAL interfacing class. The Handler is responsible of interfacing with universAAL, it will handle the UICalls by delegating to the Renderer, and it will also provide a method to submit the user input.

Author:
amedrano
See Also:
UIHandler, Renderer

Field Summary
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
Constructor Summary
protected Handler(ModuleContext context, UIHandlerProfile initialSubscription)
          internal constructor.
 
Method Summary
 void adaptationParametersChanged(String dialogID, String changedProp, Object newVal)
          
 void communicationChannelBroken()
          
 Resource cutDialog(String dialogID)
          
 User getCurrentUser()
          Get the current user that is inputing information.
 void handleUICall(UIRequest req)
          Handle UIRequest.
 void setCurrentUser(User currentUser)
          Change the current User.
 void submit(Submit submit)
          Shortcut to send UIResponse related to Submit Buttons.
 void unSetCurrentUser()
          The current User has logged off, re adapt handler to this situation.
 
Methods inherited from class org.universAAL.middleware.ui.UIHandler
addNewRegParams, busDyingOut, dialogFinished, getMyID, getRealizedHandlerProfiles, handleRequest, removeMatchingRegParams, userLoggedIn
 
Methods inherited from class org.universAAL.middleware.bus.member.BusMember
close, getType, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler

protected Handler(ModuleContext context,
                  UIHandlerProfile initialSubscription)
internal constructor.

Parameters:
context - the ModuleContext to be able to implement an UIHandler
initialSubscription - The Subscription parameters that dictate to which UIRequests the handler responds to see UIHandler
Method Detail

adaptationParametersChanged

public void adaptationParametersChanged(String dialogID,
                                        String changedProp,
                                        Object newVal)

Specified by:
adaptationParametersChanged in class UIHandler
Parameters:
dialogID - the dialog id
changedProp - the changed prop
newVal - the new val

communicationChannelBroken

public void communicationChannelBroken()

Specified by:
communicationChannelBroken in class UIHandler

cutDialog

public Resource cutDialog(String dialogID)

Specified by:
cutDialog in class UIHandler
Parameters:
dialogID - the dialog id
Returns:
the resource data form the Form filled by the user up to the moment this call is performed.

handleUICall

public void handleUICall(UIRequest req)
Handle UIRequest. this callback method will trigger the rendering process for the UIRequest. It will also extract important information, so the handler can adapt to the user's circumstances.

Specified by:
handleUICall in class UIHandler
Parameters:
req - the UIRequest

getCurrentUser

public User getCurrentUser()
Get the current user that is inputing information.

Returns:
the current user.

setCurrentUser

public void setCurrentUser(User currentUser)
Change the current User. and adapt UIHandlerProfile to the User.

Parameters:
currentUser - the user to be the current user.

unSetCurrentUser

public void unSetCurrentUser()
The current User has logged off, re adapt handler to this situation.


submit

public void submit(Submit submit)
Shortcut to send UIResponse related to Submit Buttons.

Parameters:
submit - the Submit button model pressed.


Copyright © 2014 universAAL Consortium. All Rights Reserved.