Class ProjectModuleHelper

java.lang.Object
com.nomagic.magicdraw.magicreport.tools.ProjectModuleHelper

@OpenApiAll public class ProjectModuleHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getDescriptionString(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Get description of attached project.
    static String
    getLatestVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Get latest version of specified attached project.
    getProjectVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Return project version of attached project.
    static String
    getRepresentationString(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Return user friendly representation string about given attached project
    static String
    getRequiredVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Get required version of specified attached project.
    getSharedModule(com.nomagic.ci.persistence.IAttachedProject module)
    Return a list of project module from specified module.
    Return a list of project module from current project.
    static String
    getUsedVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Get used version of specified attached project.
    static long
    getVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Get version number of specified attached project.
    getVersionList(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Return all project versions of attached project.
    getVersions(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Return a list of project version information from opened server project.
    The result will be sorted in descending order.
    getVersions(com.nomagic.ci.persistence.IAttachedProject attachedProject, String sortType)
    Return a list of project version information from opened server project.
    The result will be sorted by specified sortType.
    static boolean
    isRemote(com.nomagic.ci.persistence.IAttachedProject attachedProject)
    Check if given project is remote - from teamwork server or TW Cloud.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProjectModuleHelper

      public ProjectModuleHelper()
  • Method Details

    • getSharedModule

      public static Collection<ProjectModule> getSharedModule(Project project)
      Return a list of project module from current project.
      Parameters:
      project - a Project
      Returns:
      a list of ProjectModule
    • getSharedModule

      public static Collection<ProjectModule> getSharedModule(com.nomagic.ci.persistence.IAttachedProject module)
      Return a list of project module from specified module.
      Parameters:
      module - an IAttachedProject
      Returns:
      a list of ProjectModule
    • getDescriptionString

      @CheckForNull public static String getDescriptionString(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Get description of attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      module description
    • getRepresentationString

      public static String getRepresentationString(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Return user friendly representation string about given attached project
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      user friendly project representation
    • isRemote

      public static boolean isRemote(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Check if given project is remote - from teamwork server or TW Cloud.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      true if project is from server
    • getLatestVersion

      public static String getLatestVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Get latest version of specified attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      latest version
    • getVersion

      public static long getVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Get version number of specified attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      version number as long
    • getUsedVersion

      public static String getUsedVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Get used version of specified attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      used version
    • getRequiredVersion

      public static String getRequiredVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Get required version of specified attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      required version
    • getProjectVersion

      @CheckForNull public static ProjectVersion getProjectVersion(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Return project version of attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      a ProjectVersion of attached project
    • getVersions

      public static List<ProjectVersion> getVersions(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Return a list of project version information from opened server project.
      The result will be sorted in descending order.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      List of ProjectVersion
    • getVersions

      public static List<ProjectVersion> getVersions(com.nomagic.ci.persistence.IAttachedProject attachedProject, String sortType)
      Return a list of project version information from opened server project.
      The result will be sorted by specified sortType.
      Parameters:
      attachedProject - an IAttachedProject
      sortType - type of sorting. Specify "asc" sort in descending order. Default is descending sort.
      Returns:
      List of ProjectVersion
    • getVersionList

      public static List<ProjectVersion> getVersionList(com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Return all project versions of attached project.
      Parameters:
      attachedProject - an IAttachedProject
      Returns:
      list of ProjectVersion of attached project