org.universAAL.ui.dm.dialogManagement
Class DialogPriorityQueueVerbosity

Package class diagram package DialogPriorityQueueVerbosity
java.lang.Object
  extended by org.universAAL.ui.dm.dialogManagement.DialogPriorityQueueVerbosity
All Implemented Interfaces:
IUIRequestPool

public class DialogPriorityQueueVerbosity
extends Object
implements IUIRequestPool

This IUIRequestPool will manage active dialogs in a PriorityQueue while keeping suspended dialogs in a Map.

Author:
amedrano

Constructor Summary
DialogPriorityQueueVerbosity()
           
 
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 IUIRequestPool.getCurrent() == null.
 UIRequest get(String UIReqID)
          get the UIRequest corresponding to the UIReqID.
 UIRequest getCurrent()
          Get the currently selected UIRequest.
 UIRequest getNextUIRequest()
          If IUIRequestPool.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogPriorityQueueVerbosity

public DialogPriorityQueueVerbosity()
Method Detail

add

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

Specified by:
add in interface IUIRequestPool

close

public 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 IUIRequestPool.getCurrent() == null.

Specified by:
close in interface IUIRequestPool

getCurrent

public UIRequest getCurrent()
Get the currently selected UIRequest.

Specified by:
getCurrent in interface IUIRequestPool
Returns:
the current UIRequest null if sets are empty.

getNextUIRequest

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

Specified by:
getNextUIRequest in interface IUIRequestPool
Returns:
the next UIRequest to be current.

hasToChange

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

Specified by:
hasToChange in interface IUIRequestPool
Returns:

listAllActive

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

Specified by:
listAllActive in interface IUIRequestPool
Returns:
the list of Active UIRequests

listAllSuspended

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

Specified by:
listAllSuspended in interface IUIRequestPool
Returns:
the list of Suspended UIRequest

removeAll

public void removeAll()
Remove all entries in all sets.

Specified by:
removeAll in interface IUIRequestPool

suspend

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

Specified by:
suspend in interface IUIRequestPool

unsuspend

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

Specified by:
unsuspend in interface IUIRequestPool

get

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

Specified by:
get in interface IUIRequestPool
Returns:
the UIRequest instance.


Copyright © 2014 universAAL Consortium. All Rights Reserved.