code: public Collection<String> getSampleLicense(Locale locale) throws InstallException {
          Collection<String> licenses = new ArrayList<String>();
          for (List<List<RepositoryResource>> targetList : getResolveDirector().getInstallResources().values()) {
              for (List<RepositoryResource> mrList : targetList) {
                  for (RepositoryResource mr : mrList) {
                      ResourceType type = mr.getType();
                      if (type.equals(ResourceType.PRODUCTSAMPLE) ||
                          type.equals(ResourceType.OPENSOURCE)) {
                          try {
                              AttachmentResource lar = mr.getLicenseAgreement(locale);
                              if (lar != null)
                                  licenses.add(InstallLicenseImpl.getLicense(lar));
                          } catch (RepositoryException e) {
                              throw ExceptionUtils.createByKey(e, "ERROR_FAILED_TO_GET_ASSET_LICENSE", mr.getName());
                          }
                      }
                  }
              }
          }
          return licenses;
      }
docs: Gets the sample licenses from install resources
  
  @param locale Locale of license
  @return Collection of licenses as Strings for samples
  @throws InstallException