@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() |
| 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<ProjectModule> |
getAuxiliaryResource()
Get list of auxiliary resource modules in the project.
|
java.lang.String |
getDescription()
Get project description.
|
java.lang.String |
getDescription(IAttachedProject attachedProject)
Get project description from specified attached project.
|
java.lang.String |
getDescription(ProjectModule projectModule)
Get project description from specified project module.
|
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.lang.String |
getLatestVersion(IAttachedProject attachedProject)
Get latest version of attached project
|
java.lang.String |
getLatestVersion(ProjectModule projectModule)
Get latest version of project module
|
java.util.Collection<ProjectModule> |
getLocalModule()
Get list of used local modules in the project.
|
java.util.Collection<ProjectModule> |
getLocalModule(boolean includeAuxiliary)
Get list of used local modules in the project.
|
Model |
getModel()
Deprecated.
use ProjectTool#getPrimaryModel()
|
java.util.Collection<ProjectModule> |
getModuleList()
Get list of used local modules excluding auxiliary resource in the project.
|
java.util.Collection<ProjectModule> |
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).
|
ProjectVersion |
getProjectVersion()
Get current project version of current project
|
ProjectVersion |
getProjectVersion(IAttachedProject attachedProject)
Return project version of attached Project.
|
ProjectVersion |
getProjectVersion(ProjectModule projectModule)
Get a project version of project module
|
java.lang.String |
getRepresentationString(IAttachedProject attachedProject)
Return user friendly representation string about given attached project
|
java.lang.String |
getRepresentationString(ProjectModule projectModule)
Return user friendly representation string about given project module
|
java.lang.String |
getRequiredVersion(IAttachedProject attachedProject)
Get required version of attached project
|
java.lang.String |
getRequiredVersion(ProjectModule projectModule)
Get required version of project module
|
java.util.Collection<ProjectModule> |
getServerModule()
Get list of used server modules in the project exclude auxiliary resource.
|
java.util.Collection<ProjectModule> |
getServerModule(boolean includeAuxiliary)
Get list of used server modules in the project.
|
java.util.Collection<ProjectModule> |
getSharedModule()
Return a list of shared module from current project.
|
java.util.Collection<ProjectModule> |
getSharedModule(IAttachedProject attachedProject)
Return a list of shared module
ProjectModule from specified module. |
java.util.Collection<ProjectModule> |
getSharedModule(ProjectModule projectModule)
Return a list of shared module from specified module.
|
java.lang.String |
getTitle()
Return project title.
|
java.lang.String |
getUsedVersion(IAttachedProject attachedProject)
Get used version of attached project
|
java.lang.String |
getUsedVersion(ProjectModule projectModule)
Get used version of project module
|
long |
getVersion()
Return project version number.
|
long |
getVersion(IAttachedProject attachedProject)
Get current version of attached project.
|
long |
getVersion(ProjectModule projectModule)
Get current version of project module
|
java.util.List<ProjectVersion> |
getVersionList()
Return a list of project version information from opened server project.
|
java.util.List<ProjectVersion> |
getVersionList(IAttachedProject attachedProject)
Return all project versions of attached project.
|
java.util.List<ProjectVersion> |
getVersionList(ProjectModule projectModule)
Return all project versions of project module.
|
java.util.List<ProjectVersion> |
getVersions()
Return a list of project version information from opened server project.
|
java.util.List<ProjectVersion> |
getVersions(boolean ascendingOrder)
Return a list of project version information from opened server project.
if ascendingOrder is true, the result will be sorted in ascending order. |
static java.util.List<ProjectVersion> |
getVersions(ProjectDescriptor projectDescriptor) |
java.util.List<ProjectVersion> |
getVersions(java.lang.String sortType)
Return a list of project version information from opened server project.
The result will be sorted by specified sortType. |
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, setPropertiespublic 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()
@CheckForNull public java.lang.String getFileName()
public boolean isRemote()
public boolean isDirty()
@CheckForNull public BaseElement getElementByID(java.lang.String id)
id - the id of the element.public java.util.Collection<java.lang.String> getAllElementId()
public int getXmiVersion()
@Deprecated @CheckForNull public Model getModel()
getPrimaryModel() should be used instead as
needed.@CheckForNull public Package getPrimaryModel()
public java.util.List<Package> getAllModels()
public long getVersion()
public ProjectVersion getProjectVersion()
ProjectVersion of current projectpublic java.util.List<ProjectVersion> getVersions()
ProjectVersionpublic java.util.List<ProjectVersion> getVersions(java.lang.String sortType)
sortType - type of sorting. Specify "asc" sort in ascending order. Default is descending sort.ProjectVersionpublic java.util.List<ProjectVersion> getVersions(boolean ascendingOrder)
ascendingOrder - true to sort in ascending orderProjectVersionpublic java.util.List<ProjectVersion> getVersionList()
ProjectVersionpublic static java.util.List<ProjectVersion> getVersions(ProjectDescriptor projectDescriptor)
public long getVersion(ProjectModule projectModule)
projectModule - a ProjectModulepublic java.util.List<ProjectVersion> getVersionList(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectProjectVersion of attached projectpublic java.util.List<ProjectVersion> getVersionList(ProjectModule projectModule)
projectModule - a ProjectModuleProjectVersion of project modulepublic long getVersion(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic ProjectVersion getProjectVersion(ProjectModule projectModule)
projectModule - a ProjectModuleProjectVersion of project modulepublic ProjectVersion getProjectVersion(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectProjectVersion of specified attached projectpublic java.lang.String getRepresentationString(ProjectModule projectModule)
projectModule - a ProjectModulepublic java.lang.String getRepresentationString(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic java.lang.String getUsedVersion(ProjectModule projectModule)
projectModule - a ProjectModulepublic java.lang.String getUsedVersion(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic java.lang.String getRequiredVersion(ProjectModule projectModule)
projectModule - a ProjectModulepublic java.lang.String getRequiredVersion(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic java.lang.String getLatestVersion(ProjectModule projectModule)
projectModule - a ProjectModulepublic java.lang.String getLatestVersion(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic java.lang.String getDescription()
public java.lang.String getDescription(IAttachedProject attachedProject)
attachedProject - an IAttachedProjectpublic java.lang.String getDescription(ProjectModule projectModule)
projectModule - projectModule ProjectModulepublic java.util.Collection<ProjectModule> getSharedModule()
ProjectModulepublic java.util.Collection<ProjectModule> getSharedModule(ProjectModule projectModule)
projectModule - a ProjectModuleProjectModulepublic java.util.Collection<ProjectModule> getSharedModule(IAttachedProject attachedProject)
ProjectModule from specified module.attachedProject - an IAttachedProjectProjectModulepublic java.util.Collection<ProjectModule> getModuleList()
ProjectModulepublic java.util.Collection<ProjectModule> getModuleList(boolean includeAuxiliary)
includeAuxiliary - if true, the auxiliary resources will be included. ProjectModulepublic java.util.Collection<ProjectModule> getServerModule()
ProjectModulepublic java.util.Collection<ProjectModule> getServerModule(boolean includeAuxiliary)
includeAuxiliary - if true, the auxiliary resources will be included. ProjectModulepublic java.util.Collection<ProjectModule> getLocalModule()
ProjectModulepublic java.util.Collection<ProjectModule> getLocalModule(boolean includeAuxiliary)
includeAuxiliary - if true, the auxiliary resources will be included. ProjectModulepublic java.util.Collection<ProjectModule> getAuxiliaryResource()
ProjectModule that are auxiliary resources.