Пример #1
0
  public File getFullExport(Consumer consumer, String cdnKey, String webAppPrefix, String apiUrl)
      throws ExportCreationException {
    // TODO: need to delete tmpDir (which contains the archive,
    // which we need to return...)
    try {
      File tmpDir = new SyncUtils(config).makeTempDir("export");
      File baseDir = new File(tmpDir.getAbsolutePath(), "export");
      baseDir.mkdir();

      exportMeta(baseDir, cdnKey);
      exportConsumer(baseDir, consumer, webAppPrefix, apiUrl);
      exportIdentityCertificate(baseDir, consumer);
      exportEntitlements(baseDir, consumer);
      exportEntitlementsCerts(baseDir, consumer, null, true);
      exportProducts(baseDir, consumer);
      exportConsumerTypes(baseDir);
      exportRules(baseDir);
      exportDistributorVersions(baseDir);
      exportContentDeliveryNetworks(baseDir);
      return makeArchive(consumer, tmpDir, baseDir);
    } catch (IOException e) {
      log.error("Error generating entitlement export", e);
      throw new ExportCreationException("Unable to create export archive", e);
    }
  }
Пример #2
0
  public File getFullExport(Consumer consumer) throws ExportCreationException {
    // TODO: need to delete tmpDir (which contains the archive,
    // which we need to return...)
    try {
      File tmpDir = new SyncUtils(config).makeTempDir("export");
      File baseDir = new File(tmpDir.getAbsolutePath(), "export");
      baseDir.mkdir();

      exportMeta(baseDir);
      exportConsumer(baseDir, consumer);
      exportEntitlements(baseDir, consumer);
      exportEntitlementsCerts(baseDir, consumer, null, true);
      exportProducts(baseDir, consumer);
      exportConsumerTypes(baseDir);
      exportRules(baseDir);
      return makeArchive(consumer, tmpDir, baseDir);
    } catch (IOException e) {
      log.error("Error generating entitlement export", e);
      throw new ExportCreationException("Unable to create export archive", e);
    }
  }