edu.stanford.smi.protegex.owl.model
Interface Task

All Known Implementing Classes:
AbstractTask

public interface Task

User: matthewhorridge
The University Of Manchester
Medical Informatics Group
Date: Sep 11, 2005

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

Represents a task that could potentially take a significant amount of time to complete and should therefore have some kind of progress display if this is the case.


Method Summary
 void cancelTask()
          Requests that the task be cancelled.
 int getProgressMax()
          Gets the maximum progress value for this task.
 int getProgressMin()
          Gets the minimum progress value for this task.
 String getTitle()
          Gets the title for this task.
 boolean isCancelled()
          Checks whether this Task has been cancelled.
 boolean isPossibleToCancel()
          Determines if the task can be cancelled
 void runTask()
           
 

Method Detail

cancelTask

public void cancelTask()
Requests that the task be cancelled. This method will only be called if the task can be cancelled.


getTitle

public String getTitle()
Gets the title for this task.


getProgressMin

public int getProgressMin()
Gets the minimum progress value for this task.


getProgressMax

public int getProgressMax()
Gets the maximum progress value for this task.


isCancelled

public boolean isCancelled()
Checks whether this Task has been cancelled. Unless either method is overloaded, this will return true after cancelTask has been called (e.g., via the cancel button).

Returns:
true if this has been cancelled

isPossibleToCancel

public boolean isPossibleToCancel()
Determines if the task can be cancelled

Returns:
true if the task can be cancelled, or false if the task cannot be cancelled.

runTask

public void runTask()
             throws Exception
Throws:
Exception