public class DefaultTaskStatusManager extends Object implements TaskStatusManager
Constructor and Description |
---|
DefaultTaskStatusManager() |
Modifier and Type | Method and Description |
---|---|
void |
add(TaskStatus taskStatus)
Add the TaskStatus to the TaskStatusManager.
|
void |
addObserver(Observer o) |
SimpleTaskStatus |
createDefaultSimpleTaskStatus(String title)
Create a new instance of the default implementation of a
SimpleTaskStatus.
|
SimpleTaskStatus |
creteDefaultSimpleTaskStatus(String tittle)
Create a new instance of the default implementation of a
SimpleTaskStatus.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
TaskStatus |
get(String code)
Retrieve a TaskStatus from the manager by code.
|
Map |
getAll()
Get a unmodifiable Map with all the TaskStatus in the
manager.
|
String |
getNewCode()
Return a new code to a TaskStatus.
|
TaskStatus |
getRunningTaskStatusMostRecent()
Return the running task status most recent.
|
void |
remove(String code)
Remove the TaskStatus by the passed code from the manager
|
void |
remove(TaskStatus taskStatus)
Remove the TaskStatus from the mananger.
|
void |
update(TaskStatus taskstatus)
Inform to the manager that this task status has changed.
|
public void add(TaskStatus taskStatus)
TaskStatusManager
add
in interface TaskStatusManager
taskStatus
- to add to the managerpublic TaskStatus get(String code)
TaskStatusManager
get
in interface TaskStatusManager
code
- of the TaskStatus to retrievepublic void remove(String code)
TaskStatusManager
remove
in interface TaskStatusManager
code
- of the TaskStatus to removepublic void remove(TaskStatus taskStatus)
TaskStatusManager
remove
in interface TaskStatusManager
public String getNewCode()
TaskStatusManager
getNewCode
in interface TaskStatusManager
public Map getAll()
TaskStatusManager
getAll
in interface TaskStatusManager
public void addObserver(Observer o)
addObserver
in interface Observable
public void deleteObserver(Observer o)
deleteObserver
in interface Observable
public void deleteObservers()
deleteObservers
in interface Observable
public void update(TaskStatus taskstatus)
TaskStatusManager
update
in interface TaskStatusManager
public SimpleTaskStatus creteDefaultSimpleTaskStatus(String tittle)
TaskStatusManager
creteDefaultSimpleTaskStatus
in interface TaskStatusManager
tittle
- used in the title of the new TaskStatus.public SimpleTaskStatus createDefaultSimpleTaskStatus(String title)
TaskStatusManager
createDefaultSimpleTaskStatus
in interface TaskStatusManager
title
- used in the title of the new TaskStatus.public TaskStatus getRunningTaskStatusMostRecent()
TaskStatusManager
getRunningTaskStatusMostRecent
in interface TaskStatusManager