Class ProjectModuleHelper
- java.lang.Object
-
- com.nomagic.magicdraw.magicreport.tools.ProjectModuleHelper
-
@OpenApiAll public class ProjectModuleHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ProjectModuleHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getDescriptionString(IAttachedProject attachedProject)
Get description of attached project.static java.lang.String
getLatestVersion(IAttachedProject attachedProject)
Get latest version of specified attached project.static ProjectVersion
getProjectVersion(IAttachedProject attachedProject)
Return project version of attached project.static java.lang.String
getRepresentationString(IAttachedProject attachedProject)
Return user friendly representation string about given attached projectstatic java.lang.String
getRequiredVersion(IAttachedProject attachedProject)
Get required version of specified attached project.static java.util.Collection<ProjectModule>
getSharedModule(IAttachedProject module)
Return a list of project module from specified module.static java.util.Collection<ProjectModule>
getSharedModule(Project project)
Return a list of project module from current project.static java.lang.String
getUsedVersion(IAttachedProject attachedProject)
Get used version of specified attached project.static long
getVersion(IAttachedProject attachedProject)
Get version number of specified attached project.static java.util.List<ProjectVersion>
getVersionList(IAttachedProject attachedProject)
Return all project versions of attached project.static java.util.List<ProjectVersion>
getVersions(IAttachedProject attachedProject)
Return a list of project version information from opened server project.
The result will be sorted in descending order.static java.util.List<ProjectVersion>
getVersions(IAttachedProject attachedProject, java.lang.String sortType)
Return a list of project version information from opened server project.
The result will be sorted by specified sortType.static boolean
isRemote(IAttachedProject attachedProject)
Check if given project is remote - from teamwork server or TW Cloud.
-
-
-
Method Detail
-
getSharedModule
public static java.util.Collection<ProjectModule> getSharedModule(Project project)
Return a list of project module from current project.- Parameters:
project
- aProject
- Returns:
- a list of
ProjectModule
-
getSharedModule
public static java.util.Collection<ProjectModule> getSharedModule(IAttachedProject module)
Return a list of project module from specified module.- Parameters:
module
- anIAttachedProject
- Returns:
- a list of
ProjectModule
-
getDescriptionString
@CheckForNull public static java.lang.String getDescriptionString(IAttachedProject attachedProject)
Get description of attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- module description
-
getRepresentationString
public static java.lang.String getRepresentationString(IAttachedProject attachedProject)
Return user friendly representation string about given attached project- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- user friendly project representation
-
isRemote
public static boolean isRemote(IAttachedProject attachedProject)
Check if given project is remote - from teamwork server or TW Cloud.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- true if project is from server
-
getLatestVersion
public static java.lang.String getLatestVersion(IAttachedProject attachedProject)
Get latest version of specified attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- latest version
-
getVersion
public static long getVersion(IAttachedProject attachedProject)
Get version number of specified attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- version number as long
-
getUsedVersion
public static java.lang.String getUsedVersion(IAttachedProject attachedProject)
Get used version of specified attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- used version
-
getRequiredVersion
public static java.lang.String getRequiredVersion(IAttachedProject attachedProject)
Get required version of specified attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- required version
-
getProjectVersion
@CheckForNull public static ProjectVersion getProjectVersion(IAttachedProject attachedProject)
Return project version of attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- a
ProjectVersion
of attached project
-
getVersions
public static java.util.List<ProjectVersion> getVersions(IAttachedProject attachedProject)
Return a list of project version information from opened server project.
The result will be sorted in descending order.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- List of
ProjectVersion
-
getVersions
public static java.util.List<ProjectVersion> getVersions(IAttachedProject attachedProject, java.lang.String sortType)
Return a list of project version information from opened server project.
The result will be sorted by specified sortType.- Parameters:
attachedProject
- anIAttachedProject
sortType
- type of sorting. Specify "asc" sort in descending order. Default is descending sort.- Returns:
- List of
ProjectVersion
-
getVersionList
public static java.util.List<ProjectVersion> getVersionList(IAttachedProject attachedProject)
Return all project versions of attached project.- Parameters:
attachedProject
- anIAttachedProject
- Returns:
- list of
ProjectVersion
of attached project
-
-