|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Project
The Project interface encapsulates all information about a designer's project. It contains the list of diagrams and UML models, various project properties such as the author's name, and defaults for various settings.
TODO: This interface was mechanically refactored from the implementation
class ProjectImpl. It needs to be reviewed and cleaned up,
eliminating methods which should be part of the public API and splitting the
interface into smaller function specific (e.g. TrashCan) interfaces.
| Field Summary | |
|---|---|
static int |
PROFILE_PROJECT
Project type: a profile project |
static int |
UML_PROJECT
Project type: an UML project |
| 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 s,
java.lang.Object ns)
Finds a classifier with a certain name. |
ArgoDiagram |
getActiveDiagram()
Deprecated. for 0.27.2 by tfmorris for all uses other than argo.tee. The active diagram is a concept associated with the current editing window, not a project. It can be retrieved from DiagramUtils.getActiveDiagram(),
which will get the diagram for the window
that last contained the mouse (from GEF).
Alternatively, to get the diagram from a Fig, use
((LayerPerspective) getLayer()).getDiagram(). |
java.lang.String |
getAuthoremail()
Get the author e-mail address. |
java.lang.String |
getAuthorname()
Get the author name. |
java.lang.Object |
getCurrentNamespace()
Deprecated. for 0.27.2 by tfmorris. Since we can now have multiple top level packages in the project, there is no concept of a single current namespace. Callers should use getRoots() and be prepared to handle multiple roots. |
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. for 0.25.4 by tfmorris. Use getUserDefinedModelList() or getModels(). |
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. for 0.25.4 by tfmorris - use getRoots() to
packages/model elements which are at the top level.
TODO: We probably need a getDefaultNamespace() method or something similar to replace some uses of this. |
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. for 0.27.3 by tfmorris. This appears to be unused anywhere in ArgoUML. Speak up now if you need it. |
boolean |
isDirty()
|
boolean |
isInTrash(java.lang.Object obj)
Deprecated. for 0.27.3 by tfmorris. Not actually implemented. The (future) Undo facility is a better way to handle this. |
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. |
java.lang.String |
repair()
Repair all parts of the project before a save takes place. |
void |
setActiveDiagram(ArgoDiagram theDiagram)
Deprecated. for 0.27.2 by tfmorris. The active diagram is a concept associated with the current editing window, not a project. |
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. for 0.27.2 by tfmorris. Since we can now have multiple top level packages in the project, there is no concept of a single current namespace. To add a new top-level package, use getRoots().add(Object). |
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 root)
Deprecated. for 0.25.4 by tfmorris - use setRoots(java.util.Collection). |
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. for 0.27.3 by tfmorris. This appears to be unused anywhere in ArgoUML. Speak up now if you need it. |
| Field Detail |
|---|
static final int UML_PROJECT
static final int PROFILE_PROJECT
| Method Detail |
|---|
java.lang.String getName()
int getProjectType()
void setProjectType(int projectType)
projectType - The new project type.java.net.URI getURI()
void setUri(java.net.URI theUri)
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?
theUri - The URI to set.void setFile(java.io.File file)
file - File to set the project to.java.util.List<java.lang.String> getSearchPathList()
void addSearchPath(java.lang.String searchPathElement)
searchPathElement - the element to be added to the searchpathvoid setSearchPath(java.util.List<java.lang.String> theSearchpath)
theSearchpath - The searchpath to setjava.util.List<ProjectMember> getMembers()
void addMember(java.lang.Object m)
m - the member to be addedvoid addModel(java.lang.Object model)
model - a namespacejava.lang.String getAuthorname()
void setAuthorname(java.lang.String s)
s - The new author name.java.lang.String getAuthoremail()
void setAuthoremail(java.lang.String s)
s - the new author e-mail addressjava.lang.String getVersion()
void setVersion(java.lang.String s)
s - The new version.java.lang.String getDescription()
void setDescription(java.lang.String s)
s - The new description.java.lang.String getHistoryFile()
void setHistoryFile(java.lang.String s)
s - The new history file.java.util.List getUserDefinedModelList()
java.util.Collection getModels()
WARNING: 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
getUserDefinedModelList() instead of this method.
@Deprecated java.lang.Object getModel()
getUserDefinedModelList() or getModels().
If there isn't exactly one model, null is returned.
java.lang.Object getDefaultAttributeType()
java.lang.Object getDefaultParameterType()
java.lang.Object getDefaultReturnType()
java.lang.Object findType(java.lang.String s)
TODO: Move to Model subsystem - tfm 20070307
s - the name of the type/classifier to be found
java.lang.Object findType(java.lang.String s,
boolean defineNew)
TODO: Move to Model subsystem - tfm 20070307
s - the name of the type/classifier to be founddefineNew - if true, define a new one
java.util.Collection<Fig> findFigsForMember(java.lang.Object member)
member - The member we are looking for.
This can be a model element object but also another object.
java.util.Collection findAllPresentationsFor(java.lang.Object obj)
obj - the given UML object
java.lang.Object findTypeInModel(java.lang.String s,
java.lang.Object ns)
Will only return first classifier with the matching name. TODO: Move to Model subsystem - tfm 20070307
s - is short name.ns - Namespace where we do the search.
null if not found).@Deprecated void setCurrentNamespace(java.lang.Object m)
getRoots().add(Object).
m - the namespace@Deprecated java.lang.Object getCurrentNamespace()
getRoots() and be prepared to handle multiple roots.
java.util.List<ArgoDiagram> getDiagramList()
int getDiagramCount()
ArgoDiagram getDiagram(java.lang.String name)
name - is the name to search for.
void addDiagram(ArgoDiagram d)
d - the diagram to be addedint getPresentationCountFor(java.lang.Object me)
me - the given modelelement
java.lang.Object getInitialTarget()
@Deprecated java.beans.VetoableChangeSupport getVetoSupport()
VetoableChangeSupportvoid preSave()
void postSave()
void postLoad()
void moveToTrash(java.lang.Object obj)
Deleting 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
obj - 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).
@Deprecated boolean isInTrash(java.lang.Object obj)
obj - the object
java.lang.Object findTypeInDefaultModel(java.lang.String name)
NOTE: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.
name - the name.
@Deprecated java.lang.Object getRoot()
getRoots() to
packages/model elements which are at the top level.
TODO: We probably need a getDefaultNamespace() method or something similar to replace some uses of this.
@Deprecated void setRoot(java.lang.Object root)
setRoots(java.util.Collection).
root - The root to set, a UML Packagejava.util.Collection getRoots()
void setRoots(java.util.Collection elements)
elements - Collection of top level ModelElementsboolean isValidDiagramName(java.lang.String name)
name - The name to test
java.net.URI getUri()
java.util.Map<java.lang.String,java.lang.Object> getUUIDRefs()
void setUUIDRefs(java.util.Map<java.lang.String,java.lang.Object> uUIDRefs)
uUIDRefs - The uUIDRefs to set@Deprecated void setVetoSupport(java.beans.VetoableChangeSupport theVetoSupport)
getVetoSupport() but is otherwise unused.
TODO: Why is this here since it's never used? - tfm
theVetoSupport - The vetoSupport to setVetoableChangeSupport@Deprecated ArgoDiagram getActiveDiagram()
DiagramUtils.getActiveDiagram(),
which will get the diagram for the window
that last contained the mouse (from GEF).
Alternatively, to get the diagram from a Fig, use
((LayerPerspective) getLayer()).getDiagram().
Used 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.
@Deprecated void setActiveDiagram(ArgoDiagram theDiagram)
theDiagram - the ArgoDiagramvoid setSavedDiagramName(java.lang.String diagramName)
diagramName - the name of the diagram to show
by default after loadingvoid remove()
int getPersistenceVersion()
void setPersistenceVersion(int pv)
pv - The persistenceVersion to set.java.lang.String repair()
ProjectSettings getProjectSettings()
ProfileConfiguration getProfileConfiguration()
void setProfileConfiguration(ProfileConfiguration pc)
pc - the profile configurationUndoManager getUndoManager()
boolean isDirty()
void setDirty(boolean isDirty)
isDirty - 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 |