org.universAAL.ui.dm.interfaces
Interface IUIRequestPool

Package class diagram package IUIRequestPool
All Known Implementing Classes:
DialogPriorityQueue, DialogPriorityQueueVerbosity, NonRedundantDialogPriorityQueue

public interface IUIRequestPool

Manage UIRequests. The pool consists of 2 sets, one of active UIRequests and a second with suspended UIRequests. Different implementations will influence on the Next UIRequest selection, implementing for example priority queues.

Author:
amedrano created: 26-sep-2012 13:03:50

Method Summary
 void add(UIRequest UIReq)
          Add a new UIRequest.
 void close(String UIReqID)
          Remove the UIRequest corresponding with UIReqID from any set it belongs to. if the UIRequest is the current request, then after this call getCurrent() == null.
 UIRequest get(String UIReqID)
          get the UIRequest corresponding to the UIReqID.
 UIRequest getCurrent()
          Get the currently selected UIRequest.
 UIRequest getNextUIRequest()
          If hasToChange() then get the next UIRequest, updating the current.
 boolean hasToChange()
          Whether the current UIRequest has to change.
 Collection<UIRequest> listAllActive()
          Get the Active UIRequest set.
 Collection<UIRequest> listAllSuspended()
          Get the Suspended UIRequest set.
 void removeAll()
          Remove all entries in all sets.
 void suspend(String UIReqID)
          Move a UIRequest from the active set to the suspendend one.
 void unsuspend(String UIReqID)
          Move a UIRequest from the suspendend set to the active one.
 

Method Detail

add

void add(UIRequest UIReq)
Add a new UIRequest. Directly to the active set.

Parameters:
UIReq -

close

void close(String UIReqID)
Remove the UIRequest corresponding with UIReqID from any set it belongs to. if the UIRequest is the current request, then after this call getCurrent() == null.

Parameters:
UIReqID -

getCurrent

UIRequest getCurrent()
Get the currently selected UIRequest.

Returns:
the current UIRequest null if sets are empty.

getNextUIRequest

UIRequest getNextUIRequest()
If hasToChange() then get the next UIRequest, updating the current. After this call getNextUIRequest() == getCurrent()

Returns:
the next UIRequest to be current.

hasToChange

boolean hasToChange()
Whether the current UIRequest has to change.

Returns:

listAllActive

Collection<UIRequest> listAllActive()
Get the Active UIRequest set.

Returns:
the list of Active UIRequests

listAllSuspended

Collection<UIRequest> listAllSuspended()
Get the Suspended UIRequest set.

Returns:
the list of Suspended UIRequest

removeAll

void removeAll()
Remove all entries in all sets.


suspend

void suspend(String UIReqID)
Move a UIRequest from the active set to the suspendend one. If current is suspended then getCurrent() == null

Parameters:
UIReqID -

unsuspend

void unsuspend(String UIReqID)
Move a UIRequest from the suspendend set to the active one.

Parameters:
UIReqID -

get

UIRequest get(String UIReqID)
get the UIRequest corresponding to the UIReqID.

Parameters:
UIReqID -
Returns:
the UIRequest instance.


Copyright © 2014 universAAL Consortium. All Rights Reserved.