org.gvsig.tools.task.impl
Class DefaultTaskStatusManager

java.lang.Object
  extended by org.gvsig.tools.task.impl.DefaultTaskStatusManager
All Implemented Interfaces:
Observable, TaskStatusManager

public class DefaultTaskStatusManager
extends Object
implements TaskStatusManager

Version:
$Id$
Author:
gvSIG Team

Constructor Summary
DefaultTaskStatusManager()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTaskStatusManager

public DefaultTaskStatusManager()
Method Detail

add

public void add(TaskStatus taskStatus)
Description copied from interface: TaskStatusManager
Add the TaskStatus to the TaskStatusManager. If TaskStatus already in the manager this is updated.

Specified by:
add in interface TaskStatusManager
Parameters:
taskStatus - to add to the manager

get

public TaskStatus get(String code)
Description copied from interface: TaskStatusManager
Retrieve a TaskStatus from the manager by code.

Specified by:
get in interface TaskStatusManager
Parameters:
code - of the TaskStatus to retrieve
Returns:

remove

public void remove(String code)
Description copied from interface: TaskStatusManager
Remove the TaskStatus by the passed code from the manager

Specified by:
remove in interface TaskStatusManager
Parameters:
code - of the TaskStatus to remove

remove

public void remove(TaskStatus taskStatus)
Description copied from interface: TaskStatusManager
Remove the TaskStatus from the mananger.

Specified by:
remove in interface TaskStatusManager

getNewCode

public String getNewCode()
Description copied from interface: TaskStatusManager
Return a new code to a TaskStatus.

Specified by:
getNewCode in interface TaskStatusManager
Returns:

getAll

public Map getAll()
Description copied from interface: TaskStatusManager
Get a unmodifiable Map with all the TaskStatus in the manager. The keys of map are the code of TaskStatus.

Specified by:
getAll in interface TaskStatusManager
Returns:
Map of TaskStatus.

addObserver

public void addObserver(Observer o)
Specified by:
addObserver in interface Observable

deleteObserver

public void deleteObserver(Observer o)
Specified by:
deleteObserver in interface Observable

deleteObservers

public void deleteObservers()
Specified by:
deleteObservers in interface Observable

update

public void update(TaskStatus taskstatus)
Description copied from interface: TaskStatusManager
Inform to the manager that this task status has changed. This method has used by the implementation of TaskStatus to inform to the manager of changes in a TaskStatus.

Specified by:
update in interface TaskStatusManager

creteDefaultSimpleTaskStatus

public SimpleTaskStatus creteDefaultSimpleTaskStatus(String tittle)
Description copied from interface: TaskStatusManager
Create a new instance of the default implementation of a SimpleTaskStatus.

Specified by:
creteDefaultSimpleTaskStatus in interface TaskStatusManager
Parameters:
tittle - used in the title of the new TaskStatus.
Returns:
the new SimpleTaskStatus.

createDefaultSimpleTaskStatus

public SimpleTaskStatus createDefaultSimpleTaskStatus(String title)
Description copied from interface: TaskStatusManager
Create a new instance of the default implementation of a SimpleTaskStatus.

Specified by:
createDefaultSimpleTaskStatus in interface TaskStatusManager
Parameters:
title - used in the title of the new TaskStatus.
Returns:
the new SimpleTaskStatus.

getRunningTaskStatusMostRecent

public TaskStatus getRunningTaskStatusMostRecent()
Description copied from interface: TaskStatusManager
Return the running task status most recent.

Specified by:
getRunningTaskStatusMostRecent in interface TaskStatusManager
Returns:


Copyright © 2004-2011 gvSIG. All Rights Reserved.