|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.kernel.ProjectImpl
public class ProjectImpl
The ProjectImpl is a data structure that represents the designer's current project. It manages the list of diagrams and UML models.
NOTE: This was named Project until 0.25.4 when it was replaced by an interface of the same name and renamed to ProjectImpl.
| Field Summary |
|---|
| Fields inherited from interface org.argouml.kernel.Project |
|---|
PROFILE_PROJECT, UML_PROJECT |
| Constructor Summary | |
|---|---|
ProjectImpl()
Constructor. |
|
ProjectImpl(int type)
Constructor. |
|
ProjectImpl(int type,
java.net.URI theProjectUri)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDiagram(ArgoDiagram d)
|
void |
addMember(java.lang.Object m)
Add a member: ArgoDiagram, a UML Model, or a ProjectMemberTodoList. |
void |
addModel(java.lang.Object model)
|
void |
addSearchPath(java.lang.String searchPathElement)
|
java.util.Collection |
findAllPresentationsFor(java.lang.Object obj)
Returns a list with all figs for some UML object on all diagrams. |
java.util.Collection<Fig> |
findFigsForMember(java.lang.Object member)
Finds all figs on the diagrams for some project member, including the figs containing the member (so for some operation, the containing figclass is returned). |
java.lang.Object |
findType(java.lang.String s)
Searches for a type/classifier with name s. |
java.lang.Object |
findType(java.lang.String s,
boolean defineNew)
Searches for a type/classifier with name s. |
java.lang.Object |
findTypeInDefaultModel(java.lang.String name)
Find a type by name in the default model. |
java.lang.Object |
findTypeInModel(java.lang.String typeName,
java.lang.Object namespace)
Finds a classifier with a certain name. |
ArgoDiagram |
getActiveDiagram()
Deprecated. |
java.lang.String |
getAuthoremail()
Get the author e-mail address. |
java.lang.String |
getAuthorname()
Get the author name. |
java.lang.Object |
getCurrentNamespace()
Deprecated. |
java.lang.Object |
getDefaultAttributeType()
Return the default type for an attribute. |
java.lang.Object |
getDefaultParameterType()
Return the default type for a parameter. |
java.lang.Object |
getDefaultReturnType()
Return the default type for the return parameter of a method. |
java.lang.String |
getDescription()
Get the description. |
ArgoDiagram |
getDiagram(java.lang.String name)
Finds a diagram with a specific name or UID. |
int |
getDiagramCount()
Get the number of diagrams in this project. |
java.util.List<ArgoDiagram> |
getDiagramList()
|
java.lang.String |
getHistoryFile()
Get the history file name. |
java.lang.Object |
getInitialTarget()
|
java.util.List<ProjectMember> |
getMembers()
Get all members of the project. |
java.lang.Object |
getModel()
Deprecated. |
java.util.Collection |
getModels()
Returns all top level Packages (e.g. |
java.lang.String |
getName()
Get the project name. |
int |
getPersistenceVersion()
Used by "argo.tee". |
int |
getPresentationCountFor(java.lang.Object me)
|
ProfileConfiguration |
getProfileConfiguration()
|
ProjectSettings |
getProjectSettings()
Used by "argo.tee". |
int |
getProjectType()
Get the project type. |
java.lang.Object |
getRoot()
Deprecated. |
java.util.Collection |
getRoots()
Return a collection of top level Model Elements. |
java.util.List<java.lang.String> |
getSearchPathList()
Used by "argo.tee". |
UndoManager |
getUndoManager()
Return the UndoManager for this project. |
java.net.URI |
getUri()
Returns the uri. |
java.net.URI |
getURI()
Get the URI for this project. |
java.util.List |
getUserDefinedModelList()
Returns all models defined by the user. |
java.util.Map<java.lang.String,java.lang.Object> |
getUUIDRefs()
Returns the uUIDRefs. |
java.lang.String |
getVersion()
Get the version. |
java.beans.VetoableChangeSupport |
getVetoSupport()
Deprecated. |
boolean |
isDirty()
|
boolean |
isInTrash(java.lang.Object obj)
Deprecated. |
boolean |
isValidDiagramName(java.lang.String name)
Returns true if the given name is a valid name for a diagram. |
void |
moveToTrash(java.lang.Object obj)
Moves some object to trash, i.e. |
void |
postLoad()
This is executed after a load. |
void |
postSave()
This is executed after a save. |
void |
preSave()
This is executed before a save. |
void |
remove()
Remove the project. |
protected void |
removeDiagram(ArgoDiagram d)
Removes a diagram from the list with diagrams. |
protected void |
removeProjectMemberDiagram(ArgoDiagram d)
Removes a project member diagram completely from the project. |
java.lang.String |
repair()
Repair all parts of the project before a save takes place. |
void |
setActiveDiagram(ArgoDiagram theDiagram)
Deprecated. |
void |
setAuthoremail(java.lang.String s)
Set the author e-mail address. |
void |
setAuthorname(java.lang.String s)
Set the author name. |
void |
setCurrentNamespace(java.lang.Object m)
Deprecated. |
void |
setDescription(java.lang.String s)
Set a new description. |
void |
setDirty(boolean isDirty)
Set the dirty flag for the project. |
void |
setFile(java.io.File file)
Set the project file. |
void |
setHistoryFile(java.lang.String s)
Set the history file name. |
void |
setPersistenceVersion(int pv)
|
void |
setProfileConfiguration(ProfileConfiguration pc)
Set the profile configuration. |
void |
setProjectType(int projectType)
Set the project type. |
void |
setRoot(java.lang.Object theRoot)
Deprecated. |
void |
setRoots(java.util.Collection elements)
Set the top level ModelElements for this project. |
void |
setSavedDiagramName(java.lang.String diagramName)
|
void |
setSearchPath(java.util.List<java.lang.String> theSearchpath)
Sets the searchpath. |
void |
setUri(java.net.URI theUri)
Set the URI for this project. |
void |
setUUIDRefs(java.util.Map<java.lang.String,java.lang.Object> uUIDRefs)
Sets the uUIDRefs. |
void |
setVersion(java.lang.String s)
Set the new version. |
void |
setVetoSupport(java.beans.VetoableChangeSupport theVetoSupport)
Deprecated. |
protected void |
trashInternal(java.lang.Object obj)
Removes some object from the project. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProjectImpl(int type,
java.net.URI theProjectUri)
theProjectUri - Uri to read the project from.public ProjectImpl()
public ProjectImpl(int type)
| Method Detail |
|---|
public java.lang.String getName()
Project
getName in interface Projectpublic int getProjectType()
Project
getProjectType in interface Projectpublic void setProjectType(int projectType)
Project
setProjectType in interface ProjectprojectType - The new project type.public java.net.URI getUri()
Project
getUri in interface Projectpublic java.net.URI getURI()
Project
getURI in interface Projectpublic void setUri(java.net.URI theUri)
Project
Don't use this directly! Use instead:
#setProjectURI(URI, Project)
TODO: Why isn't this deprecated or private if it is not to be used?
setUri in interface ProjecttheUri - the URI for the projectpublic void setFile(java.io.File file)
Project
setFile in interface Projectfile - File to set the project to.public java.util.List<java.lang.String> getSearchPathList()
Project
getSearchPathList in interface Projectpublic void addSearchPath(java.lang.String searchPathElement)
addSearchPath in interface ProjectsearchPathElement - the element to be added to the searchpathpublic java.util.List<ProjectMember> getMembers()
Project
getMembers in interface Projectpublic void addMember(java.lang.Object m)
Project
addMember in interface Projectm - the member to be addedpublic void addModel(java.lang.Object model)
addModel in interface Projectmodel - a namespaceprotected void removeProjectMemberDiagram(ArgoDiagram d)
d - the ArgoDiagrampublic java.lang.String getAuthorname()
Project
getAuthorname in interface Projectpublic void setAuthorname(java.lang.String s)
Project
setAuthorname in interface Projects - The new author name.public java.lang.String getAuthoremail()
Project
getAuthoremail in interface Projectpublic void setAuthoremail(java.lang.String s)
Project
setAuthoremail in interface Projects - the new author e-mail addresspublic java.lang.String getVersion()
Project
getVersion in interface Projectpublic void setVersion(java.lang.String s)
Project
setVersion in interface Projects - The new version.public java.lang.String getDescription()
Project
getDescription in interface Projectpublic void setDescription(java.lang.String s)
Project
setDescription in interface Projects - The new description.public java.lang.String getHistoryFile()
Project
getHistoryFile in interface Projectpublic void setHistoryFile(java.lang.String s)
Project
setHistoryFile in interface Projects - The new history file.public java.util.List getUserDefinedModelList()
Project
getUserDefinedModelList in interface Projectpublic java.util.Collection getModels()
ProjectWARNING: The models returned by this method are not ordered. Any code which makes the assumption that the user model is first (or any other ordering assumption) is broken!
NOTE: Since user defined models and profiles are
handled quite differently, you normally want to use
Project.getUserDefinedModelList() instead of this method.
getModels in interface Project@Deprecated public java.lang.Object getModel()
Project
If there isn't exactly one model, null is returned.
getModel in interface Projectpublic java.lang.Object findType(java.lang.String s)
ProjectTODO: Move to Model subsystem - tfm 20070307
findType in interface Projects - the name of the type/classifier to be found
public java.lang.Object getDefaultAttributeType()
Project
getDefaultAttributeType in interface Projectpublic java.lang.Object getDefaultParameterType()
Project
getDefaultParameterType in interface Projectpublic java.lang.Object getDefaultReturnType()
Project
getDefaultReturnType in interface Project
public java.lang.Object findType(java.lang.String s,
boolean defineNew)
ProjectTODO: Move to Model subsystem - tfm 20070307
findType in interface Projects - the name of the type/classifier to be founddefineNew - if true, define a new one
public java.util.Collection<Fig> findFigsForMember(java.lang.Object member)
Project
findFigsForMember in interface Projectmember - The member we are looking for.
This can be a model element object but also another object.
public java.util.Collection findAllPresentationsFor(java.lang.Object obj)
Project
findAllPresentationsFor in interface Projectobj - the given UML object
public java.lang.Object findTypeInModel(java.lang.String typeName,
java.lang.Object namespace)
ProjectWill only return first classifier with the matching name. TODO: Move to Model subsystem - tfm 20070307
findTypeInModel in interface ProjecttypeName - is short name.namespace - Namespace where we do the search.
null if not found).@Deprecated public void setCurrentNamespace(java.lang.Object m)
setCurrentNamespace in interface Projectm - the namespace@Deprecated public java.lang.Object getCurrentNamespace()
getCurrentNamespace in interface Projectpublic java.util.List<ArgoDiagram> getDiagramList()
getDiagramList in interface Projectpublic int getDiagramCount()
Project
getDiagramCount in interface Projectpublic ArgoDiagram getDiagram(java.lang.String name)
Project
getDiagram in interface Projectname - is the name to search for.
public void addDiagram(ArgoDiagram d)
addDiagram in interface Projectd - the diagram to be addedprotected void removeDiagram(ArgoDiagram d)
d - the ArgoDiagrampublic int getPresentationCountFor(java.lang.Object me)
getPresentationCountFor in interface Projectme - the given modelelement
public java.lang.Object getInitialTarget()
getInitialTarget in interface Project@Deprecated public java.beans.VetoableChangeSupport getVetoSupport()
getVetoSupport in interface ProjectVetoableChangeSupportpublic void preSave()
Project
preSave in interface Projectpublic void postSave()
Project
postSave in interface Projectpublic void postLoad()
Project
postLoad in interface Projectpublic void moveToTrash(java.lang.Object obj)
ProjectDeleting an object involves:
- Removing Target history - Deleting all Fig representations for the object - Deleting the UML element - Deleting all dependent UML modelelements - Deleting CommentEdges (which are not UML elements) - Move to trash for enclosed objects, i.e. graphically drawn on top of - Move to trash subdiagrams for the object - Saveguard that there is always at least 1 diagram left - If the current diagram has been deleted, select a new one to show - Trigger the explorer when a diagram is deleted - Set the needsSave (dirty) flag of the projectmanager
moveToTrash in interface Projectobj - The object to be deleted
TODO: This should just be named delete() or something which better
tells what it does (since there really isn't a trash can).
protected void trashInternal(java.lang.Object obj)
obj - the object to be thrown away@Deprecated public boolean isInTrash(java.lang.Object obj)
isInTrash in interface Projectobj - the object
public java.lang.Object findTypeInDefaultModel(java.lang.String name)
ProjectNOTE:The behavior of this method changed after version 0.24. Earlier versions copied the type from the profile or default model into the user model. The type is now returned directly and HREFs are used to link to it when the model is written out.
findTypeInDefaultModel in interface Projectname - the name.
@Deprecated public final java.lang.Object getRoot()
Project
getRoot in interface Project@Deprecated public void setRoot(java.lang.Object theRoot)
Project
setRoot in interface ProjecttheRoot - The root to set, a UML Packagepublic final java.util.Collection getRoots()
Project
getRoots in interface Projectpublic void setRoots(java.util.Collection elements)
Project
setRoots in interface Projectelements - Collection of top level ModelElementspublic boolean isValidDiagramName(java.lang.String name)
Project
isValidDiagramName in interface Projectname - The name to test
public java.util.Map<java.lang.String,java.lang.Object> getUUIDRefs()
Project
getUUIDRefs in interface Projectpublic void setSearchPath(java.util.List<java.lang.String> theSearchpath)
Project
setSearchPath in interface ProjecttheSearchpath - The searchpath to setpublic void setUUIDRefs(java.util.Map<java.lang.String,java.lang.Object> uUIDRefs)
Project
setUUIDRefs in interface ProjectuUIDRefs - The uUIDRefs to set@Deprecated public void setVetoSupport(java.beans.VetoableChangeSupport theVetoSupport)
ProjectProject.getVetoSupport() but is otherwise unused.
TODO: Why is this here since it's never used? - tfm
setVetoSupport in interface ProjecttheVetoSupport - The vetoSupport to setVetoableChangeSupport@Deprecated public ArgoDiagram getActiveDiagram()
ProjectUsed by "argo.tee" to save the name of this diagram, so that the same diagram can be initially shown when reloading this project. This probably needs to be converted to an ordered list of open diagram windows to support MDI.
getActiveDiagram in interface Project@Deprecated public void setActiveDiagram(ArgoDiagram theDiagram)
setActiveDiagram in interface ProjecttheDiagram - the ArgoDiagrampublic void setSavedDiagramName(java.lang.String diagramName)
setSavedDiagramName in interface ProjectdiagramName - the name of the diagram to show
by default after loadingpublic void remove()
Project
remove in interface Projectpublic int getPersistenceVersion()
Project
getPersistenceVersion in interface Projectpublic void setPersistenceVersion(int pv)
setPersistenceVersion in interface Projectpv - The persistenceVersion to set.public java.lang.String repair()
Project
repair in interface Projectpublic ProjectSettings getProjectSettings()
Project
getProjectSettings in interface Projectpublic UndoManager getUndoManager()
Project
getUndoManager in interface Projectpublic ProfileConfiguration getProfileConfiguration()
getProfileConfiguration in interface Projectpublic void setProfileConfiguration(ProfileConfiguration pc)
Project
setProfileConfiguration in interface Projectpc - the profile configurationpublic boolean isDirty()
isDirty in interface Projectpublic void setDirty(boolean isDirty)
Project
setDirty in interface ProjectisDirty - true if the project should be marked as dirty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |