edu.cmu.hcii.calo.engine.AutomatedEngine Class Reference

Inherits edu.cmu.hcii.calo.messagePassing.MessageTarget, and edu.cmu.hcii.calo.engine.Engine.

Inheritance diagram for edu.cmu.hcii.calo.engine.AutomatedEngine:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.engine.AutomatedEngine:

Collaboration graph
[legend]
List of all members.

Detailed Description

An AI simulator for the final prototype.

Receives changes from the GUI and generates "AI" decisions that drive the various managers.

Author:
Will Haines


Public Member Functions

void addNotification (String id, NotificationType type, String name, String text, Person person, double priority, long time)
 Adds a notification to the notification manager.
void addTask (String id, String taskName, boolean isOnHold, boolean isComplete, Calendar dueDate, double priority, long time)
 Adds a task to the task manager.
void changeNotification (String id, String noteName, String text, Person person, double priority, long time)
 Determines and sets the priority of a notification.
void changeTask (String id, String taskName, boolean isOnHold, boolean isComplete, Calendar dueDate, double priority, long time)
 Changes a task in the task manager.
void deleteNotification (String id, long time)
 Deletes a notification.
void deleteTask (String id, long time)
 Deletes a task.
void onMessageReceived (Observable sender, Message msg)
 Handles messages from various managers that are going to let it know that some changes went down.
void reset ()
 Resets this engine back to the way it was when it was first created.

Static Public Member Functions

static AutomatedEngine getEngine ()
 Returns the singleton instance of this engine.

Package Attributes

Map< String, TasktaskIDs
 A mapping to keep track of tasks uniquely.

Private Member Functions

 AutomatedEngine ()
 Constructs the AutomatedEngine instance.
void automatedSetTaskPriority (Task task)
 Set the priority of a task based on its due date, with things that are nearly due at the highest priority.
void setHistoryManager (Message message)
 Stores a message in the history manager.

Private Attributes

Timer timer
 The timer to defer scripted actions.
Map< String, NotificationnotificationIDs
 A mapping to keep track of notifications uniquely.

Static Private Attributes

static AutomatedEngine uniqueInstance = null
 The singleton instance of this engine.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.engine.AutomatedEngine.AutomatedEngine (  )  [private]

Constructs the AutomatedEngine instance.

Private because this is a singleton.


Member Function Documentation

static AutomatedEngine edu.cmu.hcii.calo.engine.AutomatedEngine.getEngine (  )  [static]

Returns the singleton instance of this engine.

Returns:
the singleton instance

void edu.cmu.hcii.calo.engine.AutomatedEngine.addNotification ( String  id,
NotificationType  type,
String  name,
String  text,
Person  person,
double  priority,
long  time 
)

Adds a notification to the notification manager.

Parameters:
id the identifier to assign this notification
type this notification's type
name this notification's name
text this notification's text
person this notificaiton's associated person
priority this notification's priority
time the time at which to add this notification

void edu.cmu.hcii.calo.engine.AutomatedEngine.addTask ( String  id,
String  taskName,
boolean  isOnHold,
boolean  isComplete,
Calendar  dueDate,
double  priority,
long  time 
)

Adds a task to the task manager.

Parameters:
id this task's unique identifier
taskName this task's name
isOnHold whether this task is on hold
isComplete whether this task is complete
dueDate the date when this task is due
priority this tasks priority
time the time at which to add this task

void edu.cmu.hcii.calo.engine.AutomatedEngine.automatedSetTaskPriority ( Task  task  )  [private]

Set the priority of a task based on its due date, with things that are nearly due at the highest priority.

If something doesn't have a due date, its priority is lower than all due date tasks, but based on add time.

Parameters:
task the task whose priority will be updated

void edu.cmu.hcii.calo.engine.AutomatedEngine.changeNotification ( String  id,
String  noteName,
String  text,
Person  person,
double  priority,
long  time 
)

Determines and sets the priority of a notification.

Parameters:
id the identifier to assign this notification
noteName this notification's name
text this notification's text
person this notificaiton's associated person
priority this notification's priority
time the time at which to change this notification

void edu.cmu.hcii.calo.engine.AutomatedEngine.changeTask ( String  id,
String  taskName,
boolean  isOnHold,
boolean  isComplete,
Calendar  dueDate,
double  priority,
long  time 
)

Changes a task in the task manager.

Parameters:
id this task's unique identifier
taskName this task's name
isOnHold whether this task is on hold
isComplete whether this task is complete
dueDate the date when this task is due
priority this tasks priority
time the time at which to add this task

void edu.cmu.hcii.calo.engine.AutomatedEngine.deleteNotification ( String  id,
long  time 
)

Deletes a notification.

Parameters:
id the identifier of the notification to delete
time the time at which to delete this notification

void edu.cmu.hcii.calo.engine.AutomatedEngine.deleteTask ( String  id,
long  time 
)

Deletes a task.

Parameters:
id the identifier of the task to delete
time the time at which to delete this task

void edu.cmu.hcii.calo.engine.AutomatedEngine.onMessageReceived ( Observable  sender,
Message  msg 
) [virtual]

Handles messages from various managers that are going to let it know that some changes went down.

Parameters:
sender The manager that sent this message
msg The message to handle

Implements edu.cmu.hcii.calo.messagePassing.MessageTarget.

void edu.cmu.hcii.calo.engine.AutomatedEngine.reset (  ) 

Resets this engine back to the way it was when it was first created.

void edu.cmu.hcii.calo.engine.AutomatedEngine.setHistoryManager ( Message  message  )  [private]

Stores a message in the history manager.

Parameters:
message the message to make a history item out of


Member Data Documentation

AutomatedEngine edu.cmu.hcii.calo.engine.AutomatedEngine.uniqueInstance = null [static, private]

The singleton instance of this engine.

Timer edu.cmu.hcii.calo.engine.AutomatedEngine.timer [private]

The timer to defer scripted actions.

Map<String, Notification> edu.cmu.hcii.calo.engine.AutomatedEngine.notificationIDs [private]

A mapping to keep track of notifications uniquely.

Map<String, Task> edu.cmu.hcii.calo.engine.AutomatedEngine.taskIDs [package]

A mapping to keep track of tasks uniquely.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:13 2007 for CALO by  doxygen 1.5.2