org.argouml.cognitive
Class Designer

java.lang.Object
  |
  +--org.argouml.cognitive.Designer
All Implemented Interfaces:
java.util.EventListener, Poster, java.beans.PropertyChangeListener, java.lang.Runnable, java.io.Serializable

public class Designer
extends java.lang.Object
implements Poster, java.lang.Runnable, java.beans.PropertyChangeListener, java.io.Serializable

This class models the designer who is building a complex design in some application domain and needs continuous feedback to aid in the making of good design decisions.

This area needs work, especially as it is a central idea of Argo.

Currently everything is hardcoded. what can be configurable??

the ToDoList is dependent on this class.

This class listens to property changes from ...?

This class implements Poster because ...?

TODO: implement as singleton?? There are comments that suggest this should be done.

See Also:
Serialized Form

Field Summary
protected  long _critiqueDuration
          needs documenting
protected  int _critiqueLock
          needs documenting
protected  long _lastCritique
          needs documenting
static int _longestAdd
          needs documenting
static int _longestHot
          needs documenting
static boolean _userWorking
          needs documenting
protected static Category cat
           
static Designer TheDesigner
          the singleton of this class: TODO: needs to be made private.
static java.util.Vector UNSPEC_DECISION_VECTOR
          needs documenting
static java.util.Vector UNSPEC_GOAL_VECTOR
          needs documenting
 
Method Summary
 void addToDoItems(ToDoList list)
          Add all the items in the given list to my list.
 boolean canFixIt(ToDoItem item)
          just returns false
static void clearCritiquing()
          needs documenting
 boolean containsKnowledgeType(java.lang.String type)
          needs documenting
 void critique(Design des)
          Look for potential problems or open issues in the given design.
 void critiqueASAP(java.lang.Object dm, java.lang.String reason)
          what does this method do? why is is synchronised? TODO: what about when objects are first created?
 void defineDecision(java.lang.String decision, int priority)
          needs documenting
 void determineActiveCritics()
          Ask this designer's agency to select which critics should be active.
static void disableCritiquing()
          needs documenting
 void disruptivelyWarn(ToDoItem item)
          Empty.
 int disruptiveThreshold()
          just returns the value 9, Used to determine which ToDoItems are urgent.
static void enableCritiquing()
          needs documenting
 java.lang.String expand(java.lang.String desc, VectorSet offs)
          just returns the descr param
 void fixIt(ToDoItem item, java.lang.Object arg)
          empty
 Agency getAgency()
          Reply the Agency object that is helping this Designer.
 boolean getAutoCritique()
          autoCritique and critiquingInterval are two prameters that control how the critiquing thread operates.
 ChildGenerator getChildGenerator()
          needs documenting
 javax.swing.Icon getClarifier()
          just returns null
 int getCritiquingInterval()
          needs documenting
static java.lang.Object getCritiquingRoot()
          needs documenting
 DecisionModel getDecisionModel()
          needs documenting
 java.util.Vector getDecisions()
          needs documenting
 java.lang.String getExpertEmail()
          needs documenting
 GoalModel getGoalModel()
          needs documenting
 java.util.Vector getGoals()
          needs documenting
 java.util.Properties getPrefs()
          Reply the designers personal preferneces.
 java.util.Vector getSupportedDecisions()
          needs documenting
 java.util.Vector getSupportedGoals()
          needs documenting
 ToDoList getToDoList()
          Reply this Designer's ToDoList, a list of pending problems and issues that the designer might be interested in.
 boolean hasGoal(java.lang.String goal)
          Record the extent to which the designer desires the given goal.
 void inform(ToDoItem item)
          Inform the human designer using this system that the given ToDoItem should be considered.
 boolean isConsidering(Decision d)
          needs documenting
 boolean isConsidering(java.lang.String decision)
          Reply true iff the designer is currently considering the given decison.
 void listRoleItemSet(MElementEvent mee)
          TODO: remove this
 void nondisruptivelyWarn(ToDoItem item)
          Inform the human designer that there is a ToDoItem that is relevant to his design work, and allow him to consider it on his own initiative.
 void propertyChange(java.beans.PropertyChangeEvent pce)
          performs critique asap
 void propertySet(MElementEvent mee)
          TODO: remove this
 void recovered(MElementEvent mee)
          TODO: remove this
 void removed(MElementEvent mee)
          TODO: remove this
 void removeToDoItems(ToDoList list)
          Remove all the items in the given list from my list.
 void roleAdded(MElementEvent mee)
          TODO: remove this
 void roleRemoved(MElementEvent mee)
          TODO: remove this
 void run()
          Continuously select and execute critics against this designer's design.
 void setAutoCritique(boolean b)
          see getAutoCritique()
 void setChildGenerator(ChildGenerator cg)
          needs documenting
 void setCritiquingInterval(int i)
          needs documenting
static void setCritiquingRoot(java.lang.Object d)
          needs documenting
 void setDecisionPriority(java.lang.String decision, int priority)
          Record the extent to which the designer is considering the given decision.
 void setExpertEmail(java.lang.String addr)
          needs documenting
 void setGoalPriority(java.lang.String goal, int priority)
          needs documenting
 void snooze()
          empty
 void spawnCritiquer(java.lang.Object root)
          Start a separate thread to continually select and execute critics that are relevant to this designer's work.
 void startConsidering(Decision d)
          needs documenting
 void startConsidering(java.lang.String decision)
          needs documenting
 void startDesiring(java.lang.String goal)
          needs documenting
 boolean stillValid(ToDoItem i, Designer d)
          This method returns true.
 void stopConsidering(Decision d)
          needs documenting
 void stopConsidering(java.lang.String decision)
          needs documenting
 void stopDesiring(java.lang.String goal)
          needs documenting
 boolean supports(Decision d)
          needs documenting
 boolean supports(Goal g)
          just returns true
static Designer theDesigner()
          needs documenting
static void theDesigner(Designer d)
          needs documenting
 java.lang.String toString()
          needs documenting
 void unsnooze()
          empty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cat

protected static Category cat

TheDesigner

public static Designer TheDesigner
the singleton of this class: TODO: needs to be made private.


_userWorking

public static boolean _userWorking
needs documenting


UNSPEC_DECISION_VECTOR

public static java.util.Vector UNSPEC_DECISION_VECTOR
needs documenting


UNSPEC_GOAL_VECTOR

public static java.util.Vector UNSPEC_GOAL_VECTOR
needs documenting


_longestAdd

public static int _longestAdd
needs documenting


_longestHot

public static int _longestHot
needs documenting


_critiqueDuration

protected long _critiqueDuration
needs documenting


_critiqueLock

protected int _critiqueLock
needs documenting


_lastCritique

protected long _lastCritique
needs documenting

Method Detail

theDesigner

public static void theDesigner(Designer d)
needs documenting


theDesigner

public static Designer theDesigner()
needs documenting


spawnCritiquer

public void spawnCritiquer(java.lang.Object root)
Start a separate thread to continually select and execute critics that are relevant to this designer's work.


run

public void run()
Continuously select and execute critics against this designer's design. spawnCritiquer is used to start a Thread that runs this.

Specified by:
run in interface java.lang.Runnable

critiqueASAP

public void critiqueASAP(java.lang.Object dm,
                         java.lang.String reason)
what does this method do? why is is synchronised? TODO: what about when objects are first created?


critique

public void critique(Design des)
Look for potential problems or open issues in the given design.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
performs critique asap

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

propertySet

public void propertySet(MElementEvent mee)
TODO: remove this


listRoleItemSet

public void listRoleItemSet(MElementEvent mee)
TODO: remove this


recovered

public void recovered(MElementEvent mee)
TODO: remove this


removed

public void removed(MElementEvent mee)
TODO: remove this


roleAdded

public void roleAdded(MElementEvent mee)
TODO: remove this


roleRemoved

public void roleRemoved(MElementEvent mee)
TODO: remove this


determineActiveCritics

public void determineActiveCritics()
Ask this designer's agency to select which critics should be active.


getAutoCritique

public boolean getAutoCritique()
autoCritique and critiquingInterval are two prameters that control how the critiquing thread operates. If autoCritique is false then now critiquing is done in the background. The critiquingInterval determines how often the critiquing thread executes. The concept of an interval between runs will become less important as Argo is redesigned to be more trigger driven.


setAutoCritique

public void setAutoCritique(boolean b)
see getAutoCritique()


getCritiquingInterval

public int getCritiquingInterval()
needs documenting


setCritiquingInterval

public void setCritiquingInterval(int i)
needs documenting


disableCritiquing

public static void disableCritiquing()
needs documenting


enableCritiquing

public static void enableCritiquing()
needs documenting


clearCritiquing

public static void clearCritiquing()
needs documenting


setCritiquingRoot

public static void setCritiquingRoot(java.lang.Object d)
needs documenting


getCritiquingRoot

public static java.lang.Object getCritiquingRoot()
needs documenting


getChildGenerator

public ChildGenerator getChildGenerator()
needs documenting


setChildGenerator

public void setChildGenerator(ChildGenerator cg)
needs documenting


getDecisionModel

public DecisionModel getDecisionModel()
needs documenting


getDecisions

public java.util.Vector getDecisions()
needs documenting


getGoalModel

public GoalModel getGoalModel()
needs documenting


getGoals

public java.util.Vector getGoals()
needs documenting


stillValid

public boolean stillValid(ToDoItem i,
                          Designer d)
This method returns true.

ToDoItem's that are posted by the designer are assumed to be valid until the designer explicitly removes them. Perhaps in the future the designer could specify a condition to determine when his items expire.

Specified by:
stillValid in interface Poster
See Also:
ToDoItem, Critic.stillValid(org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)

supports

public boolean supports(Decision d)
needs documenting

Specified by:
supports in interface Poster

getSupportedDecisions

public java.util.Vector getSupportedDecisions()
needs documenting

Specified by:
getSupportedDecisions in interface Poster

supports

public boolean supports(Goal g)
just returns true

Specified by:
supports in interface Poster

getSupportedGoals

public java.util.Vector getSupportedGoals()
needs documenting

Specified by:
getSupportedGoals in interface Poster

containsKnowledgeType

public boolean containsKnowledgeType(java.lang.String type)
needs documenting

Specified by:
containsKnowledgeType in interface Poster

expand

public java.lang.String expand(java.lang.String desc,
                               VectorSet offs)
just returns the descr param

Specified by:
expand in interface Poster

getClarifier

public javax.swing.Icon getClarifier()
just returns null

Specified by:
getClarifier in interface Poster

getToDoList

public ToDoList getToDoList()
Reply this Designer's ToDoList, a list of pending problems and issues that the designer might be interested in.

See Also:
ToDoList

addToDoItems

public void addToDoItems(ToDoList list)
Add all the items in the given list to my list.


removeToDoItems

public void removeToDoItems(ToDoList list)
Remove all the items in the given list from my list.


getPrefs

public java.util.Properties getPrefs()
Reply the designers personal preferneces.


isConsidering

public boolean isConsidering(java.lang.String decision)
Reply true iff the designer is currently considering the given decison.


isConsidering

public boolean isConsidering(Decision d)
needs documenting


setDecisionPriority

public void setDecisionPriority(java.lang.String decision,
                                int priority)
Record the extent to which the designer is considering the given decision.


defineDecision

public void defineDecision(java.lang.String decision,
                           int priority)
needs documenting


startConsidering

public void startConsidering(java.lang.String decision)
needs documenting


startConsidering

public void startConsidering(Decision d)
needs documenting


stopConsidering

public void stopConsidering(java.lang.String decision)
needs documenting


stopConsidering

public void stopConsidering(Decision d)
needs documenting


hasGoal

public boolean hasGoal(java.lang.String goal)
Record the extent to which the designer desires the given goal.


setGoalPriority

public void setGoalPriority(java.lang.String goal,
                            int priority)
needs documenting


startDesiring

public void startDesiring(java.lang.String goal)
needs documenting


stopDesiring

public void stopDesiring(java.lang.String goal)
needs documenting


getExpertEmail

public java.lang.String getExpertEmail()
needs documenting

Specified by:
getExpertEmail in interface Poster

setExpertEmail

public void setExpertEmail(java.lang.String addr)
needs documenting

Specified by:
setExpertEmail in interface Poster

snooze

public void snooze()
empty

Specified by:
snooze in interface Poster

unsnooze

public void unsnooze()
empty

Specified by:
unsnooze in interface Poster

getAgency

public Agency getAgency()
Reply the Agency object that is helping this Designer.


inform

public void inform(ToDoItem item)
Inform the human designer using this system that the given ToDoItem should be considered. This can be disruptive if the item is urgent, or (more commonly) it is added to his ToDoList so that he can consider it at his leisure.


disruptivelyWarn

public void disruptivelyWarn(ToDoItem item)
Empty. Inform the human designer that there is an urgent ToDoItem that (s)he must consider before doing any more work. Currently not implemented.


nondisruptivelyWarn

public void nondisruptivelyWarn(ToDoItem item)
Inform the human designer that there is a ToDoItem that is relevant to his design work, and allow him to consider it on his own initiative.


disruptiveThreshold

public int disruptiveThreshold()
just returns the value 9, Used to determine which ToDoItems are urgent.


toString

public java.lang.String toString()
needs documenting

Overrides:
toString in class java.lang.Object

fixIt

public void fixIt(ToDoItem item,
                  java.lang.Object arg)
empty

Specified by:
fixIt in interface Poster

canFixIt

public boolean canFixIt(ToDoItem item)
just returns false

Specified by:
canFixIt in interface Poster


ArgoUML © 1996-2003 (20040229)ArgoUML Project HomeArgoUML Cookbook