コード例 #1
0
  /**
   * Retrieve all the governance artifacts which associated with the given lifecycle
   *
   * @param lcName Name of the lifecycle
   * @return GovernanceArtifact array
   * @throws GovernanceException
   */
  public GovernanceArtifact[] getAllGovernanceArtifactsByLifecycle(String lcName)
      throws GovernanceException {
    String[] paths = GovernanceUtils.getAllArtifactPathsByLifecycle(registry, lcName, mediaType);
    if (paths == null) {
      return new GovernanceArtifact[0];
    }
    GovernanceArtifact[] artifacts = new GovernanceArtifact[paths.length];
    for (int i = 0; i < paths.length; i++) {
      artifacts[i] = GovernanceUtils.retrieveGovernanceArtifactByPath(registry, paths[i]);
    }

    return artifacts;
  }