@OpenApiAll
public class ProjectTool
extends com.nomagic.magicreport.engine.Tool
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_NAME
Contains a context name.
|
Constructor and Description |
---|
ProjectTool()
Prevent empty initiate.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.String> |
getAllElementId()
Return the collection of all element id in the project.
|
java.util.List<Package> |
getAllModels()
Returns a list of models in the project (the primary model of the project and all the models of the modules
(attached projects)).
|
java.util.Collection<ModuleDescriptor> |
getAuxiliaryResource()
Get list of auxiliary resource in the project.
|
java.util.Collection<Diagram> |
getDiagrams()
Return all existing diagrams stored in this Project.
|
java.util.Collection<Diagram> |
getDiagrams(java.lang.String type)
Return existing diagrams of given type stored in Project.
|
java.lang.String |
getDirectory()
Return project directory.
|
BaseElement |
getElementByID(java.lang.String id)
Return the Element with given id.
|
java.lang.String |
getExtension()
Return project file extension.
|
java.lang.String |
getFileName()
Method returns file name of this project.
|
java.util.Collection<ModuleDescriptor> |
getLocalModule()
Get list of used local modules in the project.
|
java.util.Collection<ModuleDescriptor> |
getLocalModule(boolean includeAuxiliary)
Get list of used local modules in the project.
|
Model |
getModel()
Deprecated.
|
ModuleDescriptor |
getModuleDescriptor(IProject module,
IAttachedProject descriptor)
Return a wrapped IAttachedProject.
|
java.util.Collection<ModuleDescriptor> |
getModuleList()
Get list of used local modules including auxiliary resource in the project.
|
java.util.Collection<ModuleDescriptor> |
getModuleList(boolean includeAuxiliary)
Get list of used server and local modules in the project.
|
java.lang.String |
getName()
Return project name.
|
java.util.Collection<DiagramPresentationElement> |
getPresentationDiagrams()
Return all existing presentation diagrams stored in this Project.
|
java.util.Collection<DiagramPresentationElement> |
getPresentationDiagrams(java.lang.String type)
Return existing presentation diagrams of given type stored in Project.
|
Package |
getPrimaryModel()
Returns the primary (main) model of the project (not including the ones from modules).
|
java.util.Collection<ModuleDescriptor> |
getServerModule()
Get list of used server modules in the project exclude auxiliary resource.
|
java.util.Collection<ModuleDescriptor> |
getServerModule(boolean includeAuxiliary)
Get list of used server modules in the project.
|
java.util.Collection<ModuleDescriptor> |
getSharedModule(IAttachedProject module)
Deprecated.
|
java.util.Collection<ModuleDescriptor> |
getSharedModule(ModuleDescriptor module)
Return a list of shared module
IAttachedProject from specified
module . |
java.lang.String |
getTitle()
Return project title.
|
long |
getVersion()
Return project version number.
|
java.util.List<com.nomagic.teamwork.common.projects.Version> |
getVersionList()
Return a list of
Version information from opened teamwork
server project. |
int |
getXmiVersion()
Return the projects XMI version.
|
boolean |
isDirty()
Return true if this project was modified after last save/load.
|
boolean |
isRemote()
Return the remote or not remote state of the project.
|
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
public static final java.lang.String CONTEXT_NAME
public java.util.Collection<Diagram> getDiagrams()
public java.util.Collection<Diagram> getDiagrams(java.lang.String type)
type
- the given diagrams type.public java.util.Collection<DiagramPresentationElement> getPresentationDiagrams()
public java.util.Collection<DiagramPresentationElement> getPresentationDiagrams(java.lang.String type)
type
- the given diagrams type.public java.lang.String getName()
public java.lang.String getTitle()
public java.lang.String getExtension()
public java.lang.String getDirectory()
public java.lang.String getFileName()
public boolean isRemote()
public boolean isDirty()
public BaseElement getElementByID(java.lang.String id)
id
- the id of the element.public java.util.Collection<java.lang.String> getAllElementId()
public int getXmiVersion()
public long getVersion()
@Deprecated public Model getModel()
getPrimaryModel()
should be used instead as
needed.public Package getPrimaryModel()
public java.util.List<Package> getAllModels()
public java.util.List<com.nomagic.teamwork.common.projects.Version> getVersionList()
Version
information from opened teamwork
server project.Version
@Deprecated public java.util.Collection<ModuleDescriptor> getSharedModule(IAttachedProject module)
ModuleDescriptor
from specified
module
.module
- a modulepublic java.util.Collection<ModuleDescriptor> getSharedModule(ModuleDescriptor module)
IAttachedProject
from specified
module
.module
- a moduleIAttachedProject
public ModuleDescriptor getModuleDescriptor(IProject module, IAttachedProject descriptor)
module
- a owner (main project)module
- a moduleIAttachedProject
public java.util.Collection<ModuleDescriptor> getModuleList()
includeAuxiliary
- if true, the auxiliary resources will be returned. default value is False.public java.util.Collection<ModuleDescriptor> getModuleList(boolean includeAuxiliary)
includeAuxiliary
- if true, the auxiliary resources will be returned. default value is False.public java.util.Collection<ModuleDescriptor> getServerModule()
public java.util.Collection<ModuleDescriptor> getServerModule(boolean includeAuxiliary)
includeAuxiliary
- if true, the auxiliary resources will be returned. default value is False.public java.util.Collection<ModuleDescriptor> getLocalModule()
includeAuxiliary
- if true, the auxiliary resources will be returned. default value is False.public java.util.Collection<ModuleDescriptor> getLocalModule(boolean includeAuxiliary)
includeAuxiliary
- if true, the auxiliary resources will be returned. default value is False.public java.util.Collection<ModuleDescriptor> getAuxiliaryResource()