org.dftproject.genesis.core.research
Class Objective

java.lang.Object
  extended by org.dftproject.genesis.core.research.Objective
Direct Known Subclasses:
SearchObjective, UpdateObjective

public abstract class Objective
extends java.lang.Object

A research objective.


Constructor Summary
Objective(ResearchManager manager)
          Creates an objective for the given research manager
 
Method Summary
 void addTaskFamily(TaskFamily family)
          Adds the given task family to this objective.
 void cancel()
          Cancels this objective and all task families working on it.
protected  void familyCanceled(TaskFamily family)
          Called when the given task family is canceled.
protected  void familyUpdated(TaskFamily family)
          Called when the given task family is updated.
protected  void finished()
          Called when this objective has been canceled and has no more task families.
abstract  java.lang.String getDescription()
          Returns this objective's description.
abstract  org.eclipse.swt.graphics.Image getIcon()
          Returns this objective's icon.
 java.util.Set<TaskFamily> getTaskFamilies()
          Returns the set of task families working on this objective.
 boolean isCanceled()
          Returns whether or not this objective has been canceled.
protected  void removeTaskFamily(TaskFamily family)
          Removes the given task family from this objective.
protected  void taskAdded(Task task)
          Called when the given task is added to one of this objective's task families.
protected  void taskCanceled(Task task)
          Called when the given task from one of this objective's task families is canceled.
protected  void taskRemoved(Task task)
          Called when the given task from one of this objective's task families is removed.
protected  void taskUpdated(Task task)
          Called when the given task from one of this objective's task families is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Objective

public Objective(ResearchManager manager)
Creates an objective for the given research manager

Parameters:
manager - a research manager
Method Detail

cancel

public void cancel()
Cancels this objective and all task families working on it.


isCanceled

public boolean isCanceled()
Returns whether or not this objective has been canceled.

Returns:
if this objective has been canceled

getTaskFamilies

public java.util.Set<TaskFamily> getTaskFamilies()
Returns the set of task families working on this objective.

Returns:
set of task families

addTaskFamily

public void addTaskFamily(TaskFamily family)
Adds the given task family to this objective.

Parameters:
family - a task family

familyUpdated

protected void familyUpdated(TaskFamily family)
Called when the given task family is updated.

Parameters:
family - a task family

familyCanceled

protected void familyCanceled(TaskFamily family)
Called when the given task family is canceled.

Parameters:
family - a task family

removeTaskFamily

protected void removeTaskFamily(TaskFamily family)
Removes the given task family from this objective.

Parameters:
family - a task family

finished

protected void finished()
Called when this objective has been canceled and has no more task families.


taskAdded

protected void taskAdded(Task task)
Called when the given task is added to one of this objective's task families.

Parameters:
task - a task

taskCanceled

protected void taskCanceled(Task task)
Called when the given task from one of this objective's task families is canceled.

Parameters:
task - a task

taskUpdated

protected void taskUpdated(Task task)
Called when the given task from one of this objective's task families is updated.

Parameters:
task - a task

taskRemoved

protected void taskRemoved(Task task)
Called when the given task from one of this objective's task families is removed.

Parameters:
task - a task

getDescription

public abstract java.lang.String getDescription()
Returns this objective's description.

Returns:
a description

getIcon

public abstract org.eclipse.swt.graphics.Image getIcon()
Returns this objective's icon.

Returns:
an icon