/**
   * Retrieve all the governance artifacts which associated with the given lifecycle in the given
   * lifecycle state
   *
   * @param lcName Name of the lifecycle
   * @param lcState Name of the current lifecycle state
   * @return GovernanceArtifact array
   * @throws GovernanceException
   */
  public GovernanceArtifact[] getAllGovernanceArtifactsByLIfecycleStatus(
      String lcName, String lcState) throws GovernanceException {
    String[] paths =
        GovernanceUtils.getAllArtifactPathsByLifecycleState(registry, lcName, lcState, 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;
  }