Inheritance diagram for edu.cmu.hcii.calo.engine.AutomatedEngine:
Receives changes from the GUI and generates "AI" decisions that drive the various managers.
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, Task > | taskIDs |
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, Notification > | notificationIDs |
A mapping to keep track of notifications uniquely. | |
Static Private Attributes | |
static AutomatedEngine | uniqueInstance = null |
The singleton instance of this engine. |
edu.cmu.hcii.calo.engine.AutomatedEngine.AutomatedEngine | ( | ) | [private] |
Constructs the AutomatedEngine instance.
Private because this is a singleton.
static AutomatedEngine edu.cmu.hcii.calo.engine.AutomatedEngine.getEngine | ( | ) | [static] |
Returns the singleton instance of this engine.
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.
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.
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.
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.
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.
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.
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.
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.
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.
message | the message to make a history item out of |
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.