org.argouml.cognitive.checklist
Class CheckItem

java.lang.Object
  extended byorg.argouml.cognitive.checklist.CheckItem
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UMLCheckItem

public class CheckItem
extends Object
implements Serializable

This class defines an item that can be placed on a Checklist. This is a short piece of text to prompt the designer to think of a specific design issue. CheckItems are similiar to critics in that they are categorized to be relevant to issues the designer is interested in, they have a guarding condition that returns true if the CheckItem should be presented, and they have a piece of text as design feedback. They are different in that their predicate is almost always the constant 'true', and the feedback they provide is much simpler. CheckItems are part of Checklists. And Checklists are registered with the CheckManager. If you have a piece of advice you would like to give a designer, you can implement it as a CheckItem _very_ easily. If you can formalize the advice more, you can implement it as a Critic.

See Also:
Checklist, CheckManager, Serialized Form

Field Summary
private  String category
           
private  String description
          One sentence description of the issue.
private  String moreInfoURL
          URL for background (textbook?) knowledge about the domain.
private  org.tigris.gef.util.Predicate pred
          The predicate is the condition under which the checkitem should be listed.
 
Constructor Summary
CheckItem(String c, String d)
          The constructor.
CheckItem(String c, String d, String m, org.tigris.gef.util.Predicate p)
          The constructor.
 
Method Summary
 boolean equals(Object o)
           
 String expand(String desc, Object dm)
          Customize/expand the description string just before it is displayed.
 String getCategory()
           
 String getDescription()
           
 String getDescription(Object dm)
           
 String getMoreInfoURL()
           
 org.tigris.gef.util.Predicate getPredicate()
           
 int hashCode()
           
 void setCategory(String c)
           
 void setDescription(String d)
           
 void setMoreInfoURL(String m)
           
 void setPredicate(org.tigris.gef.util.Predicate p)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

category

private String category

description

private String description
One sentence description of the issue. usually in the form of a question.


moreInfoURL

private String moreInfoURL
URL for background (textbook?) knowledge about the domain.


pred

private org.tigris.gef.util.Predicate pred
The predicate is the condition under which the checkitem should be listed.

Constructor Detail

CheckItem

public CheckItem(String c,
                 String d)
The constructor.

Parameters:
c - the category
d - the description

CheckItem

public CheckItem(String c,
                 String d,
                 String m,
                 org.tigris.gef.util.Predicate p)
The constructor.

Parameters:
c - the category
d - the description
m - the more-info-url
p - the predicate
Method Detail

getCategory

public String getCategory()
Returns:
the category

setCategory

public void setCategory(String c)
Parameters:
c - the category

getDescription

public String getDescription()
Returns:
the description

getDescription

public String getDescription(Object dm)
Parameters:
dm - the design material
Returns:
the description

setDescription

public void setDescription(String d)
Parameters:
d - the description

getMoreInfoURL

public String getMoreInfoURL()
Returns:
the more-info-url

setMoreInfoURL

public void setMoreInfoURL(String m)
Parameters:
m - the more-info-url

getPredicate

public org.tigris.gef.util.Predicate getPredicate()
Returns:
the predicate

setPredicate

public void setPredicate(org.tigris.gef.util.Predicate p)
Parameters:
p - the predicate

hashCode

public int hashCode()
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
See Also:
Object.toString()

expand

public String expand(String desc,
                     Object dm)
Customize/expand the description string just before it is displayed. I.e. add offender specific information to the description string (e.g. its name).

Parameters:
desc - the description
dm - the design material
Returns:
the description


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook