Class EsiUtils

java.lang.Object
com.nomagic.magicdraw.esi.EsiUtils

@OpenApiAll public class EsiUtils extends Object
API to work with Teamwork Cloud server. Before working with users and projects there must be established connection to Teamwork Cloud server. Connection is established with this code:


EsiUtils.getTeamworkService().login(new ServerLoginInfo("localhost", "user", "password", false), false);

  • Constructor Details

    • EsiUtils

      public EsiUtils()
  • Method Details

    • getTeamworkService

      public static ITeamworkService getTeamworkService()
      Get service for working with Teamwork Cloud.
      Returns:
      service for working with Teamwork Cloud.
    • getLockService

      @CheckForNull public static ILockProjectService getLockService(@CheckForNull Project project)
      Provides api to check, request and release locks on various project data.
      Returns:
      lock service.
    • createProject

      @CheckForNull public static Project createProject(@Nonnull String name, @CheckForNull String category) throws com.nomagic.ci.persistence.PersistenceException
      Create Teamwork Cloud project. Project is created only if currently logged user rights allows to create projects.
      Parameters:
      name - project name.
      category - project category.
      Returns:
      crated project.
      Throws:
      com.nomagic.ci.persistence.PersistenceException
    • commitProject

      public static void commitProject(Project project, String comment, @CheckForNull Collection<Element> unlockElements, @CheckForNull Collection<ModuleUsage> unlockModules, boolean unlockDecomposition, @CheckForNull List<String> tags)
      Commit project.
      Parameters:
      project - project
      comment - comment.
      unlockElements - elements to unlock when committing. The collection specifies which locked elements should be unlocked after successful commit. null means that no elements should be unlocked.
      unlockModules - modules to unlock when committing. The collection specifies which project usages (modules) should be unlocked after successful commit. null means that no project usages should be unlocked.
      unlockDecomposition - true if decomposition needs to be unlocked when committing.
      tags - version tags to set.
    • exportEsiModule

      @CheckForNull public static com.nomagic.ci.persistence.IAttachedProject exportEsiModule(Project project, Collection<Package> packages, String description, String moduleName) throws Exception
      Exports module.
      Parameters:
      project - project.
      packages - packages to export.
      description - module description.
      moduleName - name of module.
      Returns:
      exported module attached project.
      Throws:
      Exception - in case of some problem
    • getRemoteProjectDescriptors

      public static List<ProjectDescriptor> getRemoteProjectDescriptors() throws Exception
      Returns descriptors of projects stored on server.
      Returns:
      list of remote project descriptors.
      Throws:
      RemoteException - in case of some problem
      Exception
    • getVersions

      public static List<com.nomagic.ci.persistence.versioning.IVersionDescriptor> getVersions(@Nonnull ProjectDescriptor descriptor)
      Get all versions of given project.
      Parameters:
      descriptor - project descriptor.
      Returns:
      list of version information.
    • addCommitTags

      public static void addCommitTags(List<String> tags, ProjectDescriptor descriptor, long version)
      Add tags for given version.
      Parameters:
      tags - tags to add.
      descriptor - project for which version tags is set.
      version - version for which tags will be added.
    • getCommitTags

      public static List<String> getCommitTags(ProjectDescriptor descriptor, long version)
      Get tags names for project version.
      Parameters:
      descriptor - project descriptor.
      version - version.
      Returns:
      list of tags for given version.
    • getCommitTagsInfo

      public static List<com.nomagic.esi.api.info.TagInfo> getCommitTagsInfo(ProjectDescriptor descriptor, long version)
      Get tags for project version.
      Parameters:
      descriptor - project descriptor.
      version - version.
      Returns:
      list of tags for given version.
    • getAllCommitTagsInfo

      public static List<com.nomagic.esi.api.info.TagInfo> getAllCommitTagsInfo(ProjectDescriptor descriptor)
      Get all tags for project.
      Parameters:
      descriptor - project descriptor.
      Returns:
      list of tags for given version.
    • removeCommitTags

      public static void removeCommitTags(ProjectDescriptor descriptor, long version)
      Remove all tags from project version.
      Parameters:
      descriptor - project descriptor.
      version - version.
    • updateProject

      public static void updateProject(Project project)
      Updates given project. Project is activated before update.
      Parameters:
      project - teamwork project to update.
    • getProjectName

      @CheckForNull public static String getProjectName(org.eclipse.emf.common.util.URI locationURI)
      Return project name for given URI.
      Parameters:
      locationURI - project location.
      Returns:
      project name.
    • setProjectName

      public static void setProjectName(ProjectDescriptor project, String newName) throws com.nomagic.ci.persistence.PersistenceException
      Rename project.
      Parameters:
      project - project descriptor
      newName - new project name.
      Throws:
      com.nomagic.ci.persistence.PersistenceException - in case of some problem
    • deleteProject

      public static void deleteProject(ProjectDescriptor project) throws com.nomagic.ci.persistence.PersistenceException
      Delete project from repository.
      Parameters:
      project - project to delete.
      Throws:
      com.nomagic.ci.persistence.PersistenceException
    • getCategories

      public static Set<CategoryInfo> getCategories()
      Returns:
      all categories from server.
    • getCategoriesToProjects

      public static Map<String,List<ProjectDescriptor>> getCategoriesToProjects() throws Exception
      Get categories for projects.
      Returns:
      projects in categories.
      Throws:
      Exception - in case of some problem
    • getCategory

      @CheckForNull public static UUID getCategory(String resourceID)
      Gets category ID for specified twc project resource ID.
      Parameters:
      resourceID - twc project resource ID
      Returns:
      category ID or null if project is not in category
    • getCategoryID

      @Deprecated @CheckForNull public static String getCategoryID(String resourceID)
      Deprecated.
      Gets category ID for specified twc project resource ID.
      Parameters:
      resourceID - twc project resource ID
      Returns:
      category ID or null if project is not in category
    • getCategoryInfoByResourceID

      @CheckForNull public static CategoryInfo getCategoryInfoByResourceID(String resourceID)
      Get CategoryInfo for specified twc project resource ID.
      Parameters:
      resourceID - twc project resource ID
      Returns:
      instance of CategoryInfo or null
    • createCategory

      public static void createCategory(String name, String description)
      Create projects category in the server.
      Parameters:
      name - category name
      description - category description
    • assignProjectToCategory

      public static void assignProjectToCategory(ProjectDescriptor project, String... categories) throws Exception
      Adds or remove project to/from categories. After this method project belongs only to categories specified for this method.
      Parameters:
      project - project to assign or remove from category.
      categories - categories to which project will be assigned.
      Throws:
      Exception - in case of some problem
    • deleteCategory

      public static void deleteCategory(String name)
      Delete category with given name.
      Parameters:
      name - category name.
    • getBranches

      public static Collection<EsiUtils.EsiBranchInfo> getBranches(ProjectDescriptor descriptor)
      Get all branches for given project.
      Parameters:
      descriptor - project descriptor.
      Returns:
      branches for given project.
    • getBranches

      public static Collection<EsiUtils.EsiBranchInfo> getBranches(ProjectDescriptor descriptor, ProgressStatus status)
      Get all branches for given project.
      Parameters:
      descriptor - project descriptor.
      status - progress status.
      Returns:
      branches for given project.
    • createBranch

      public static void createBranch(ProjectDescriptor descriptor, long version, String branchName, String branchDescription)
      Create new branch for given project.
      Parameters:
      descriptor - project descriptor.
      version - version from which branch
      branchName - new branch name.
      branchDescription - description of new branch.
      Throws:
      RuntimeException - in case network or server error occurs when creating branch.
      InsufficientPermissionsException - if currently logged in user does not have Administer Resources permission
    • getNewBranch

      public static com.nomagic.esi.api.info.BranchInfo getNewBranch(ProjectDescriptor descriptor, long version, String branchName, String branchDescription)
      Create new branch for given project.
      Parameters:
      descriptor - project descriptor.
      version - version from which branch
      branchName - new branch name.
      branchDescription - description of new branch.
      Returns:
      branch info for specified branch
      Throws:
      RuntimeException - in case network or server error occurs when creating branch.
      InsufficientPermissionsException - if currently logged in user does not have Administer Resources permission
    • getDescriptorByBranchID

      public static ProjectDescriptor getDescriptorByBranchID(ProjectDescriptor project, UUID branchID)
      Get project descriptor for given branch. This descriptor can be used to load project from branch.
      Parameters:
      project - project descriptor.
      branchID - branch id.
      Returns:
      project descriptor for given branch.
    • getDescriptorForBranch

      public static ProjectDescriptor getDescriptorForBranch(ProjectDescriptor project, String branchName)
      Get project descriptor for given branch. This descriptor can be used to load project from branch.
      Parameters:
      project - project descriptor.
      branchName - branch name.
      Returns:
      project descriptor for given branch.
    • getDescriptorForVersion

      public static ProjectDescriptor getDescriptorForVersion(ProjectDescriptor projectDescriptor, com.nomagic.ci.persistence.versioning.IVersionDescriptor versionDescriptor)
      Get descriptor for specific version. Can be used to open historic project version.
      Parameters:
      projectDescriptor - project descriptor.
      versionDescriptor - version.
      Returns:
      descriptor for specific version.
    • deleteBranch

      public static void deleteBranch(ProjectDescriptor descriptor, String branchName)
      Delete project branch.
      Parameters:
      descriptor - project which branch will be deleted.
      branchName - branch name to delete.
      Throws:
      InsufficientPermissionsException - if currently logged in user does not have Administer Resources permission
    • addToESI

      public static com.nomagic.ci.persistence.IPrimaryProject addToESI(Project project, String esiProjectName) throws com.nomagic.ci.persistence.PersistenceException
      Add project to the Teamwork Cloud server and open it.
      Parameters:
      project - project to add.
      esiProjectName - project name in teamwork cloud server.
      Returns:
      opened teamwork cloud project.
      Throws:
      com.nomagic.ci.persistence.PersistenceException - in case of some problem
    • addToESI

      public static com.nomagic.ci.persistence.IPrimaryProject addToESI(Project project, String esiProjectName, @CheckForNull String category, @CheckForNull String comment, @CheckForNull List<String> tags, @Nonnull Collection<ResolveLocalModuleInfo> resolveInfos) throws com.nomagic.ci.persistence.PersistenceException
      Add project to the Teamwork Cloud server and open it
      Parameters:
      project - the project to add
      esiProjectName - the name for the new Teamwork Cloud project
      category - the category to add the project to
      comment - the commit comment
      tags - the commit tags
      resolveInfos - the module resolve info list
      Returns:
      the added project
      Throws:
      com.nomagic.ci.persistence.PersistenceException - exception if add fails
    • convertToLocal

      @CheckForNull public static Project convertToLocal(Project project, File file)
      Convert given project to local, save and reopen it.
      Parameters:
      project - project to convert
      file - project file
      Returns:
      local project
    • getLoggedUserName

      @CheckForNull public static String getLoggedUserName()
      Returns the currently logged Teamwork Cloud user name.
      Returns:
      user name
    • getServerInfo

      @CheckForNull public static ConnectionInfo getServerInfo(Project project)
      Get server information for given project
      Parameters:
      project - project
      Returns:
      server information or null when project is not server project
    • getLoggedUserNames

      public static Set<String> getLoggedUserNames()
      Get logged in users if current user has rights to access user list.
      Returns:
      all user names.
    • getUserNames

      public static Set<String> getUserNames()
      Get all users if current user has rights to access user list.
      Returns:
      logged in user names.
    • updateModule

      public static void updateModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, ProjectDescriptor descriptor, long version) throws Exception
      Change given module to another version or branch.
      Parameters:
      project - project which module is switched.
      module - module to switch.
      descriptor - new module descriptor.
      version - new module version
      Throws:
      Exception - in case of some problem
    • updateModule

      public static void updateModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, org.eclipse.emf.common.util.URI updateFrom, long version) throws Exception
      Change given module to another version or branch.
      Parameters:
      project - project which module is switched.
      module - module to switch.
      updateFrom - project location URI.
      version - new module version
      Throws:
      Exception - in case of some problem
    • setNotifyOnNew

      public static void setNotifyOnNew(Project project, com.nomagic.ci.persistence.IAttachedProject iAttachedProject, boolean notifyOnNew)
      Method sets if application should notify about available project usage update.
      Parameters:
      project - Project to which's usage setting is applied.
      iAttachedProject - Usage's attached project to which setting is applied.
      notifyOnNew - Should notification be shown.
    • isNotifyOnNew

      public static boolean isNotifyOnNew(Project project, com.nomagic.ci.persistence.IAttachedProject iAttachedProject)
      Method returns if application should notify about available project usage update. Return false by default.
      Parameters:
      project - Project to which's usage setting is applied.
      iAttachedProject - Usage's attached project to which setting is applied.
      Returns:
      Should notification be shown. Returns false by default.
    • isProjectChanged

      public static boolean isProjectChanged(Project project)
      Method returns true when twcloud project has some changed objects in its resource, or local project's StateChangeHandler.isDirty(IProject) returns true
      Parameters:
      project - project to check for presence of changes
      Returns:
      true when project is changed
    • setNotifyOnNewTags

      public static void setNotifyOnNewTags(Project project, com.nomagic.ci.persistence.IAttachedProject iAttachedProject, @CheckForNull Collection<String> tags)
      Method sets application's notify tags about available project usage update.
      Parameters:
      project - Project to which's usage setting is applied.
      iAttachedProject - Usage's attached project to which setting is applied.
      tags - Notify tags.
    • setNotifyOnNewTags

      public static void setNotifyOnNewTags(com.nomagic.magicdraw.esi.project.project.EsiPrimaryProject project, com.nomagic.ci.persistence.IAttachedProject iAttachedProject, @CheckForNull Collection<String> tags)
      Method sets application's notify tags about available project usage update.
      Parameters:
      project - Project to which's usage setting is applied.
      iAttachedProject - Usage's attached project to which setting is applied.
      tags - Notify tags.
    • getNotifyOnNewTags

      @CheckForNull public static List<String> getNotifyOnNewTags(Project project, com.nomagic.ci.persistence.IAttachedProject iAttachedProject)
      Method returns application's notify tags about available project usage update.
      Parameters:
      project - Project to which's usage setting is applied.
      iAttachedProject - Usage's attached project to which setting is applied.
      Returns:
      Notify tags.
    • isModuleUsageNew

      public static boolean isModuleUsageNew(com.nomagic.ci.persistence.IProject fromProject, com.nomagic.ci.persistence.IProject toProject)
      Checks if the project usage exists and is new (not yet committed to server).
      Parameters:
      fromProject - the project the usage should be from
      toProject - the project the usage should be to
      Returns:
      true if the usage from specifed project exists to specified to project and if the specified to project is not null and if the usage is new (as defined above). Return false othewise
    • updateRequiredProjectUsages

      public static Map<com.nomagic.ci.persistence.IAttachedProject,Boolean> updateRequiredProjectUsages(Project project) throws Exception
      This method updates project usages to newest version. Only usages which have isNotifyOnNew(Project, IAttachedProject) set to true are updated. It can be changed using setNotifyOnNew(Project, IAttachedProject, boolean). If project usages is locked by other user or can't be updated for other reasons its update will be skipped.
      Parameters:
      project - Project which usages are updated.
      Returns:
      Results map. Key - attached project which was updated, value - was update successful.
      Throws:
      Exception - in case of some problem
      See Also:
    • applyProjectState

      Applies the state of the source project to the target project, or in other words, overwrites the content of the target project with the contents of the source project. The elements that are matched are updated, the not existing elements are removed, and new elements are added. Module usages are copied and modules are updated accordingly. To perform the operation successfully, all elements of the project, module usages, and options are locked. Any lock failure terminates the operation with a specific exception
      Parameters:
      source - the source project from which the state is copied
      target - the target project to which the state is copied
      Returns:
      a structure that holds the result of the operation
      Throws:
      IllegalArgumentException - if: 1. the projects are the same, 2. any of the projects are not ready, 3. any of the projects is not an Teamwork Cloud project, 4. the project IDs differ, 5. the target project is not editable
      ElementLockAcquisitionException - if specific element could not be locked
      ModuleUsageLockAcquisitionException - if specific module usage could not be locked
      OptionsLockAcquisitionException - if specific options could not be locked
    • applyDisconnectedProjectState

      Applies the state of the source project (local project) to the target project (TWCloud server project), or in other words, overwrites the content of the target project with the contents of the source project. The elements that are matched are updated, the not existing elements are removed, and new elements are added. Module usages are copied and modules are updated accordingly. To perform the operation successfully, all elements of the project, module usages, and options are locked. Any lock failure terminates the operation with a specific exception
      Parameters:
      source - the source project (local project) from which the state is copied
      target - the target project (server project) to which the state is copied
      Returns:
      a structure that holds the result of the operation
      Throws:
      IllegalArgumentException - if: 1. the projects are the same, 2. any of the projects are not ready, 3. the project IDs differ, 4. the target project is not editable
      ElementLockAcquisitionException - if specific element could not be locked
      ModuleUsageLockAcquisitionException - if specific module usage could not be locked
      OptionsLockAcquisitionException - if specific options could not be locked
      RuntimeException - if the method invocation fails because of another reason. Cause of the exception should be checked in order find the actual reason of the failure.
    • getLastVersion

      public static long getLastVersion(ProjectDescriptor descriptor)
      Get last project version number.
      Parameters:
      descriptor - project descriptor for Teamwork Cloud server project.
      Returns:
      last project version number, -1 - there is no such project or application is not connected to the server.
      Throws:
      RuntimeException - in case provided descriptor is not valid for current server.
    • getLastVersionDescriptor

      @CheckForNull public static com.nomagic.ci.persistence.versioning.IVersionDescriptor getLastVersionDescriptor(ProjectDescriptor descriptor)
      Get last project version descriptor.
      Parameters:
      descriptor - project descriptor for Teamwork Cloud server project.
      Returns:
      last project version descriptor, null - when there is no such project or application is not connected to the server.
      Throws:
      RuntimeException - in case provided descriptor is not valid for current server.
    • getProjectDescriptorsWithBranches

      public static Collection<ProjectDescriptor> getProjectDescriptorsWithBranches(Iterable<ProjectDescriptor> projectDescriptors)
      Invocation of this method returns a Collection of ProjectDescriptors of each branch in the given projectDescriptors.
      Parameters:
      projectDescriptors - descriptors of the projects, whose branch ProjectDescriptors should be returned
      Returns:
      project descriptors for each branch of the given projectDescriptors
    • cloneProject

      @CheckForNull public static org.eclipse.emf.common.util.URI cloneProject(org.eclipse.emf.common.util.URI sourceURI, String targetName, String targetDescription) throws Exception
      Clones project, new project is created it contains copy of source project with regenerated element ids. Application must be logged in the server, logged in user should have permission to create new project and read source project.
      Parameters:
      sourceURI - source project URI
      targetName - target project name
      targetDescription - target project description
      Returns:
      cloned project URI
      Throws:
      Exception - exception in case clone fails
    • cloneProject

      @Deprecated @CheckForNull public static org.eclipse.emf.common.util.URI cloneProject(org.eclipse.emf.common.util.URI sourceURI, String targetName, String targetDescription, @CheckForNull String targetCategoryID) throws Exception
      Clones project, new project is created it contains copy of source project with regenerated element ids. Application must be logged in the server, logged in user should have permission to create new project and read source project.
      Parameters:
      sourceURI - source project URI
      targetName - target project name
      targetDescription - target project description
      targetCategoryID - target project category ID
      Returns:
      cloned project URI
      Throws:
      Exception - exception in case clone fails
    • cloneProject

      @CheckForNull public static org.eclipse.emf.common.util.URI cloneProject(org.eclipse.emf.common.util.URI sourceURI, String targetName, String targetDescription, @CheckForNull UUID targetCategoryID) throws Exception
      Clones project, new project is created it contains copy of source project with regenerated element ids. Application must be logged in the server, logged in user should have permission to create new project and read source project.
      Parameters:
      sourceURI - source project URI
      targetName - target project name
      targetDescription - target project description
      targetCategoryID - target project category ID
      Returns:
      cloned project URI
      Throws:
      Exception - exception in case clone fails
    • cloneProjectWithUsages

      @CheckForNull public static org.eclipse.emf.common.util.URI cloneProjectWithUsages(org.eclipse.emf.common.util.URI sourceURI, String targetName, Map<String,String> usedProjectTargetNames, String targetDescription, @CheckForNull UUID targetCategoryID) throws Exception
      Clones project and its usages, new projects are created, they contain copy of source project and its non standard/system usages with regenerated element ids. Application must be logged in the server, logged in user should have permission to create new project and read source project.
      Parameters:
      sourceURI - source project URI
      targetName - target project name
      usedProjectTargetNames - used project target names map. Key - used project id, value - target name
      targetDescription - target project description
      targetCategoryID - target project category ID
      Returns:
      cloned project URI
      Throws:
      Exception - exception in case clone fails
    • getProjectDescriptorsWithBranches

      public static void getProjectDescriptorsWithBranches(ProjectDescriptor descriptor, Collection<ProjectDescriptor> descriptorsWithBranches)
      Collects all project descriptors with branch info for the given project descriptor into the provided collection.
      Parameters:
      descriptor - project descriptor for which to collect project descriptors with branch info
      descriptorsWithBranches - collection where to add the result
    • getProjectDescriptorsWithBranches

      public static void getProjectDescriptorsWithBranches(ProjectDescriptor descriptor, Collection<ProjectDescriptor> descriptorsWithBranches, ProgressStatus status)
      Collects all project descriptors with branch info for the given project descriptor into the provided collection.
      Parameters:
      descriptor - project descriptor for which to collect project descriptors with branch info
      descriptorsWithBranches - collection where to add the result
      status - progress status
    • getBranchID

      public static UUID getBranchID(org.eclipse.emf.common.util.URI locationURI)
      Gets project branch ID.
      Parameters:
      locationURI - project location URI
      Returns:
      branch ID
    • moveToUsedProject

      public static void moveToUsedProject(Project project, Map<PackageableElement,Element> moveMap, boolean silentMode) throws Exception
      Moves elements to used project(s). The moved elements must be lockable by user, and must have an owner. The target package(s) must be in the directly used project, and be lockable by user. Each moved element can be moved to a different target package. In addition to the specified elements, additional elements (such as interrelations) might be selected to be moved together. See MoveRelationManager.collectRelationsToMove(java.util.Map<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.PackageableElement, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>).
      Parameters:
      project - the main project
      moveMap - elements move map
      silentMode - if true, will move in silent mode
      Throws:
      Exception - in case moving elements fails
    • getCurrentBranch

      @CheckForNull public static EsiUtils.EsiBranchInfo getCurrentBranch(com.nomagic.ci.persistence.IProject project)
      Gets branch information for the given TWC project part. If TWC project part is not linked with TWC project (like standard profiles) or user has no permission to read then null will be returned.
      Parameters:
      project - project part
      Returns:
      branch information
    • getCommandLinePasswordManager

      @CheckForNull public static CommandLinePasswordManager getCommandLinePasswordManager(ProjectDescriptor descriptor)
      Gets password manager for command line utilities If session is not present then null will be returned.
      Parameters:
      descriptor - versionable project descriptor
      Returns:
      CommandLinePasswordManager or null if session is not initialized
    • saveToOffline

      public static EsiUtils.OfflineProjectDescriptor saveToOffline(Project project, ProgressStatus status, boolean delete) throws IOException, com.nomagic.ci.persistence.PersistenceException
      Saves the specified project to offline.
      Parameters:
      project - a project.
      status - a progress status.
      delete - delete previous saved offline project if true.
      Returns:
      offline project descriptor.
      Throws:
      IllegalArgumentException - if the specified project is not a TWC project.
      IOException - if any I/O errors occurs.
      com.nomagic.ci.persistence.PersistenceException - if persistence related problem occurs.
    • loadFromOffline

      @CheckForNull public static Project loadFromOffline(EsiUtils.OfflineProjectDescriptor descriptor, ProgressStatus status) throws Exception
      Loads the offline project.
      Parameters:
      descriptor - specifies which offline project to load.
      status - progress status.
      Returns:
      loaded project or null if the offline project was not loaded.
      Throws:
      Exception - if offline project loading fails.
    • getOfflineProject

      @CheckForNull public static EsiUtils.OfflineProjectDescriptor getOfflineProject(Project project)
      Returns offline project descriptor of the specified project or null if the project is not saved to offline.
      Parameters:
      project - a project.
      Returns:
      offline project descriptor.
      Throws:
      IllegalArgumentException - if the specified project is not a TWC project.
    • getOfflineProjects

      public static Collection<EsiUtils.OfflineProjectDescriptor> getOfflineProjects()
      Returns all available offline project descriptors.
      Returns:
      collection of offline project descriptors.