Exemplo n.º 1
0
  private IPlatformImportBundle createBundle(File file) throws FileNotFoundException {

    RepositoryFileImportBundle.Builder bundleBuilder = new RepositoryFileImportBundle.Builder();
    bundleBuilder.input(createInputStream(file));
    bundleBuilder.charSet("UTF-8");
    bundleBuilder.hidden(true);
    bundleBuilder.path("/");
    bundleBuilder.overwriteFile(true);
    bundleBuilder.name(file.getName());
    bundleBuilder.applyAclSettings(true);
    bundleBuilder.overwriteAclSettings(false);
    bundleBuilder.retainOwnership(true);
    bundleBuilder.preserveDsw(true);
    return bundleBuilder.build();
  }
 // handlers that extend this class may override this method and perform operations
 // over the bundle prior to entering its designated importer.importFile()
 public IPlatformImportBundle build(RepositoryFileImportBundle.Builder builder) {
   return builder != null ? builder.build() : null;
 }