|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.cognitive.Designer
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 (almost) everything is hardcoded. What can be configurable??
The ToDoList is dependent on this class.
This class listens to property changes from ...?
A Designer can as well create ToDO Items, such as critics do. Hence he implements the Poster interface.
Nested Class Summary | |
(package private) class |
Designer.ChildGenDMElements
|
Field Summary | |
private Vector |
addQueue
|
private Vector |
addReasonQueue
|
private Agency |
agency
Each designer has their own Agency instance that is responsible for selecting and executing critics that are relevant to this designer on an on going basis. |
private boolean |
autoCritique
|
private org.tigris.gef.util.ChildGenerator |
childGenerator
|
private Icon |
clarifier
|
private int |
critiqueCPUPercent
|
private long |
critiqueDuration
|
private int |
critiqueLock
|
private Thread |
critiquerThread
|
private int |
critiquingInterval
|
private static Object |
critiquingRoot
|
private DecisionModel |
decisions
The decisions currently being considered by the designer. |
private String |
designerName
The designerName is the name of the current user, as he can enter in the menuitem Edit->Settings...->User->Full Name. |
private String |
emailAddr
The email address where other designers can send this designer email. |
private GoalModel |
goals
The goals of the designer are likewise used by the Agency to determine what critics are relevant. |
private Vector |
hotQueue
dm's that should be critiqued ASAP. |
private Vector |
hotReasonQueue
|
private long |
lastCritique
|
private static Logger |
LOG
Logger. |
private static int |
longestAdd
|
private static int |
longestHot
|
static String |
MODEL_TODOITEM_ADDED
Property Names |
static String |
MODEL_TODOITEM_DISMISSED
Property Names |
private static PropertyChangeSupport |
pcs
|
private Properties |
prefs
Preferences -- very ill defined |
private Vector |
removeQueue
|
private static Designer |
theDesignerSingleton
the singleton of this class. |
private ToDoList |
toDoList
ToDoList items that are on the designers ToDoList because of this material. |
private static Vector |
unspecDecisionVector
|
private static Vector |
unspecGoalVector
|
private static boolean |
userWorking
|
private Vector |
warmQueue
dm's that should be critiqued relatively soon. |
Constructor Summary | |
private |
Designer()
The constructor. |
Method Summary | |
static void |
addListener(PropertyChangeListener pcl)
Adds a property change listener. |
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()
Clear all critiquing results. |
boolean |
containsKnowledgeType(String type)
|
void |
critique(Design des)
Look for potential problems or open issues in the given design. |
void |
critiqueASAP(Object dm,
String reason)
A modelelement has been changed. |
void |
defineDecision(String decision,
int priority)
|
void |
determineActiveCritics()
Ask this designer's agency to select which critics should be active. |
static void |
disableCritiquing()
Disable critiquing. |
void |
disruptivelyWarn(ToDoItem item)
Inform the human designer that there is an urgent ToDoItem that (s)he must consider before doing any more work. |
int |
disruptiveThreshold()
Used to determine which ToDoItems are urgent. |
static void |
enableCritiquing()
Enable critiquing. |
String |
expand(String desc,
org.tigris.gef.util.VectorSet offs)
Just returns the descr param. |
static void |
firePropertyChange(String property,
Object oldValue,
Object newValue)
|
void |
fixIt(ToDoItem item,
Object arg)
Does not do anything. |
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. |
org.tigris.gef.util.ChildGenerator |
getChildGenerator()
|
Icon |
getClarifier()
Get the generic clarifier for this designer/poster. |
int |
getCritiquingInterval()
Get the Critiquing interval. |
static Object |
getCritiquingRoot()
|
DecisionModel |
getDecisionModel()
|
Vector |
getDecisions()
|
String |
getDesignerName()
query the name of the designer. |
String |
getExpertEmail()
Get some contact information on the Poster. |
GoalModel |
getGoalModel()
|
Vector |
getGoals()
|
Properties |
getPrefs()
Reply the designers personal preferneces. |
Vector |
getSupportedDecisions()
|
Vector |
getSupportedGoals()
|
ToDoList |
getToDoList()
Reply this Designer's ToDoList, a list of pending problems and issues that the designer might be interested in. |
boolean |
hasGoal(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)
|
boolean |
isConsidering(String decision)
Reply true iff the designer is currently considering the given decison. |
static boolean |
isUserWorking()
|
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(PropertyChangeEvent pce)
Performs critique asap. |
static void |
removeListener(PropertyChangeListener p)
Removes a property change listener. |
void |
removeToDoItems(ToDoList list)
Remove all the items in the given list from my list. |
void |
run()
Continuously select and execute critics against this designer's design. |
void |
setAutoCritique(boolean b)
|
void |
setChildGenerator(org.tigris.gef.util.ChildGenerator cg)
|
void |
setClarifier(Icon clar)
Get the generic clarifier for this designer/poster. |
void |
setCritiquingInterval(int i)
Set the Critiquing Interval. |
static void |
setCritiquingRoot(Object d)
|
void |
setDecisionPriority(String decision,
int priority)
Record the extent to which the designer is considering the given decision. |
void |
setDesignerName(String name)
set the name of this designer. |
void |
setExpertEmail(String addr)
Update the Poster's contact info. |
void |
setGoalPriority(String goal,
int priority)
|
static void |
setUserWorking(boolean working)
|
void |
snooze()
Temporarily disable this Poster. |
void |
spawnCritiquer(Object root)
Start a separate thread to continually select and execute critics that are relevant to this designer's work. |
void |
startConsidering(Decision d)
|
void |
startConsidering(String decision)
|
void |
startDesiring(String goal)
|
boolean |
stillValid(ToDoItem i,
Designer d)
This method returns true. |
void |
stopConsidering(Decision d)
|
void |
stopConsidering(String decision)
|
void |
stopDesiring(String goal)
|
boolean |
supports(Decision d)
|
boolean |
supports(Goal g)
|
static Designer |
theDesigner()
|
String |
toString()
This is used in the todo panel, when "By Poster" is chosen for a manually created todo item. |
void |
unsnooze()
Unsnooze this Poster, it may resume posting without further delay. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static Designer theDesignerSingleton
private static boolean userWorking
private static Vector unspecDecisionVector
private static Vector unspecGoalVector
private ToDoList toDoList
private Properties prefs
private String emailAddr
private String designerName
The designerName gets updated when the user enters a new name.
private DecisionModel decisions
Decisions are currently modeled as simple descriptive strings.
Each decision also has a priority number which is ill defined, but positive Ints mean that the designer is considering it. This explicit representation of what decisions the designer is interested in at a given moment allows the Agency to select relevant critics for execution.
private GoalModel goals
private Agency agency
private Icon clarifier
private Thread critiquerThread
private int critiquingInterval
private int critiqueCPUPercent
private boolean autoCritique
private Vector hotQueue
private Vector hotReasonQueue
private Vector addQueue
private Vector addReasonQueue
private Vector removeQueue
private static int longestAdd
private static int longestHot
private Vector warmQueue
private org.tigris.gef.util.ChildGenerator childGenerator
private static Object critiquingRoot
private long critiqueDuration
private int critiqueLock
private long lastCritique
private static PropertyChangeSupport pcs
public static final String MODEL_TODOITEM_ADDED
public static final String MODEL_TODOITEM_DISMISSED
Constructor Detail |
private Designer()
Method Detail |
public static Designer theDesigner()
public void spawnCritiquer(Object root)
root
- the rootobject the critiques will checkpublic void run()
run
in interface Runnable
public void critiqueASAP(Object dm, String reason)
dm
- the design materialreason
- the reasonpublic void critique(Design des)
des
- the design to be checkedpublic static final void addListener(PropertyChangeListener pcl)
pcl
- The property change listener to addpublic static final void removeListener(PropertyChangeListener p)
p
- The class to remove as a property change listener.public static final void firePropertyChange(String property, Object oldValue, Object newValue)
property
- the property nameoldValue
- the old valuenewValue
- the new valuepublic void propertyChange(PropertyChangeEvent pce)
propertyChange
in interface PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void determineActiveCritics()
public boolean getAutoCritique()
public void setAutoCritique(boolean b)
b
- getAutoCritique()
public int getCritiquingInterval()
public void setCritiquingInterval(int i)
i
- The new interval.public static void disableCritiquing()
public static void enableCritiquing()
public static void clearCritiquing()
public static void setCritiquingRoot(Object d)
d
- the critiquing rootpublic static Object getCritiquingRoot()
public org.tigris.gef.util.ChildGenerator getChildGenerator()
public void setChildGenerator(org.tigris.gef.util.ChildGenerator cg)
cg
- the childgeneratorpublic DecisionModel getDecisionModel()
public Vector getDecisions()
public GoalModel getGoalModel()
public Vector getGoals()
public boolean stillValid(ToDoItem i, Designer d)
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.
stillValid
in interface Poster
i
- the todo itemd
- the designer
ToDoItem
,
Critic.stillValid(org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)
,
Poster.stillValid(
org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)
public boolean supports(Decision d)
supports
in interface Poster
d
- the decision
Poster.supports(org.argouml.cognitive.Decision)
public Vector getSupportedDecisions()
getSupportedDecisions
in interface Poster
Poster.getSupportedDecisions()
public boolean supports(Goal g)
supports
in interface Poster
g
- the goal
Poster.supports(org.argouml.cognitive.Goal)
public Vector getSupportedGoals()
getSupportedGoals
in interface Poster
Poster.getSupportedGoals()
public boolean containsKnowledgeType(String type)
containsKnowledgeType
in interface Poster
type
- the knowledge type
Poster.containsKnowledgeType(java.lang.String)
public String expand(String desc, org.tigris.gef.util.VectorSet offs)
expand
in interface Poster
desc
- the descriptionoffs
- the offenders
Poster.expand(java.lang.String,
org.tigris.gef.util.VectorSet)
public Icon getClarifier()
getClarifier
in interface Poster
Poster.getClarifier()
public void setClarifier(Icon clar)
clar
- the clarifier iconpublic ToDoList getToDoList()
ToDoList
public void addToDoItems(ToDoList list)
list
- the items to be addedpublic void removeToDoItems(ToDoList list)
list
- the items to be removedpublic Properties getPrefs()
public boolean isConsidering(String decision)
decision
- the decision
public boolean isConsidering(Decision d)
d
- the decision
public void setDecisionPriority(String decision, int priority)
decision
- the decisionpriority
- the prioritypublic void defineDecision(String decision, int priority)
decision
- the decisionpriority
- the prioritypublic void startConsidering(String decision)
decision
- the decisionpublic void startConsidering(Decision d)
d
- the decisionpublic void stopConsidering(String decision)
decision
- the decisionpublic void stopConsidering(Decision d)
d
- the decisionpublic boolean hasGoal(String goal)
goal
- the given goal
public void setGoalPriority(String goal, int priority)
goal
- the given goalpriority
- the prioritypublic void startDesiring(String goal)
goal
- the goal I (me, the designer) desirepublic void stopDesiring(String goal)
goal
- the goal that is not desired any morepublic String getExpertEmail()
Poster
getExpertEmail
in interface Poster
Poster.getExpertEmail()
public void setExpertEmail(String addr)
Poster
setExpertEmail
in interface Poster
addr
- the emailaddressPoster.setExpertEmail(java.lang.String)
public void snooze()
Poster
snooze
in interface Poster
Poster.snooze()
public void unsnooze()
Poster
unsnooze
in interface Poster
Poster.unsnooze()
public Agency getAgency()
public void inform(ToDoItem item)
item
- the todo itempublic void disruptivelyWarn(ToDoItem item)
item
- the todoitempublic void nondisruptivelyWarn(ToDoItem item)
item
- the todo itempublic int disruptiveThreshold()
public void setDesignerName(String name)
name
- the designer namepublic String getDesignerName()
public String toString()
Object.toString()
public void fixIt(ToDoItem item, Object arg)
fixIt
in interface Poster
item
- the todo itemarg
- the design material (?)Poster.fixIt(org.argouml.cognitive.ToDoItem,
java.lang.Object)
public boolean canFixIt(ToDoItem item)
canFixIt
in interface Poster
item
- the todo item
Poster.canFixIt(org.argouml.cognitive.ToDoItem)
public static void setUserWorking(boolean working)
working
- true if the user is working
(i.e. this is not the startup phase of ArgoUML)public static boolean isUserWorking()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |