public class ProjectMapModel
extends java.lang.Object
| Constructor and Description |
|---|
ProjectMapModel(java.util.UUID id,
IProjectMapModelInfoProvider provider)
Creates a ProjectMapModel
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangedListener(IProjectMapChangedListener listener)
Add a changed listener to the model
|
void |
beginUpdate()
enable the quiet mode, no events are generated till endUpdate is called
|
void |
endUpdate()
disable the quiet mode
|
ProjectMapActivity |
getActivity(java.util.UUID actId)
returns the ProjectMapActivity referenced with the provided id null if
not found
|
ProjectMapBox |
getBox(java.util.UUID boxId)
returns the ProjectMapBox referenced with the provided id, null if not
found
|
java.util.Collection<ProjectMapBox> |
getBoxes()
returns a read only collection of boxes defined in the model
|
int |
getErrorCount()
returns the error count of the current scope
|
IProjectMapModelInfoProvider |
getInfoProvider() |
ProjectMapLink |
getLink(java.util.UUID actId)
returns the ProjectMapLink referenced with the provided id null if not
found
|
java.util.Collection<ProjectMapLink> |
getLinks()
returns a read only collection of links defined in the model
|
java.util.UUID |
getModelId()
returns the model identifier
|
java.lang.String |
getShortDescription()
returns a short description to display at the top left of the view
|
int |
getWarningCount()
returns the warning count of the current scope
|
boolean |
isVisible()
Returns if the project map should be visible at this time
|
ProjectMapActivity |
newActivity(java.util.UUID id,
ProjectMapBox box,
IProjectMapActivityInfoProvider provider)
Creates a new activity in the model
|
ProjectMapActivity |
newActivity(java.util.UUID id,
ProjectMapBox box,
IProjectMapDependency dependency,
IProjectMapActivityInfoProvider provider)
Creates a new activity in the model
|
ProjectMapBox |
newBox(java.util.UUID id,
java.lang.String title,
java.lang.String tooltip,
boolean optional)
Creates a new box in the model
|
ProjectMapLink |
newLink(java.util.UUID id,
ProjectMapBox sourceBox,
ProjectMapBox targetBox,
ProjectMapLinkArrowType arrow,
ProjectMapLinkStyle style)
Factory for links
|
boolean |
refresh()
refresh the model by calling canExecute and isComplete on each
IProjectMapActivityInfoProvider in the model
|
boolean |
removeActivity(ProjectMapActivity activity)
Removes the activity provided from the model Returns true on success,
false on failure
|
boolean |
removeActivity(java.util.UUID actId)
Removes activity matching the provided id from the model Returns true on
success, false on failure
|
boolean |
removeBox(ProjectMapBox box)
Removes the box provided from the model Returns true on success, false on
failure
|
boolean |
removeBox(java.util.UUID boxId)
Removes box matching the provided id from the model Returns true on
success, false on failure
|
void |
removeChangedListener(IProjectMapChangedListener listener)
Remove a changed listener to the model
|
boolean |
removeLink(ProjectMapLink link)
Removes the link provided from the model Returns true on success, false
on failure
|
boolean |
removeLink(java.util.UUID lnkId)
Removes link matching the provided id from the model Returns true on
success, false on failure
|
java.lang.String |
toString() |
java.util.Collection<java.lang.String> |
validate() |
public ProjectMapModel(java.util.UUID id,
IProjectMapModelInfoProvider provider)
id - a unique identifier for the modelprovider - an interface providing feedback to the modelpublic final IProjectMapModelInfoProvider getInfoProvider()
public void addChangedListener(IProjectMapChangedListener listener)
listener - the listener to be addedpublic void removeChangedListener(IProjectMapChangedListener listener)
listener - the listener to be removedpublic void beginUpdate()
public void endUpdate()
public boolean refresh()
public ProjectMapBox newBox(java.util.UUID id, java.lang.String title, java.lang.String tooltip, boolean optional)
id - an unique identifier for the set in the modeltitle - label of the settooltip - optional - public ProjectMapActivity newActivity(java.util.UUID id, ProjectMapBox box, IProjectMapDependency dependency, IProjectMapActivityInfoProvider provider) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
java.lang.IllegalArgumentException - provider should be not null and set, parents should be of the
current modeljava.lang.NullPointerExceptionid - an unique identifier for the activity in the modelbox - the box container of the activitydependency - a set of (at least one) activity which have to be completed
before this activity is runnableprovider - an object which provides current status of the activitypublic ProjectMapActivity newActivity(java.util.UUID id, ProjectMapBox box, IProjectMapActivityInfoProvider provider) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
java.security.InvalidParameterException - set, provider should be not null and set, parents should be
of the current modeljava.lang.IllegalArgumentExceptionjava.lang.NullPointerExceptionid - an unique identifier for the activity in the modelbox - the container of the activityprovider - an object which provides current status of the activitypublic ProjectMapLink newLink(java.util.UUID id, ProjectMapBox sourceBox, ProjectMapBox targetBox, ProjectMapLinkArrowType arrow, ProjectMapLinkStyle style) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
java.lang.NullPointerException - when sourceSet or targetSet are nulljava.lang.IllegalArgumentException - when sourceSet or targetSet are not in this instance of the
modelid - a UUID to reference the linksourceBox - a ProjectMapSet source of the linktargetBox - a ProjectMapSet target of the linkarrow - a ProjectMapLinkArrowEnum valuestyle - a ProjectMapLinkStyleEnum valuepublic java.util.UUID getModelId()
public java.util.Collection<java.lang.String> validate()
public java.util.Collection<ProjectMapLink> getLinks()
public java.util.Collection<ProjectMapBox> getBoxes()
public ProjectMapBox getBox(java.util.UUID boxId)
boxId - a UUID objectpublic ProjectMapActivity getActivity(java.util.UUID actId)
actId - a UUID objectpublic ProjectMapLink getLink(java.util.UUID actId)
actId - a UUID objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean removeActivity(java.util.UUID actId)
actId - a UUIDpublic boolean removeActivity(ProjectMapActivity activity)
activity - a ProjectMapActivity objectpublic boolean removeLink(java.util.UUID lnkId)
lnkId - a UUIDpublic boolean removeLink(ProjectMapLink link)
link - a ProjectMapLink objectpublic boolean removeBox(java.util.UUID boxId)
boxId - a UUIDpublic boolean removeBox(ProjectMapBox box)
box - a ProjectMapBox objectpublic java.lang.String getShortDescription()
public int getWarningCount()
public int getErrorCount()
public boolean isVisible()
© Copyright IBM Corp. 1987, 2017