Hi Toby,

The import code is something along the lines of:

  private void importArchive(final Session session, final Archive
archive, final ImportMode mode) throws ... {
        archive.open(true);

        ImportOptions options = new ImportOptions();
        options.setImportMode(mode);

        Importer importer = new Importer(options);
        importer.run(archive, <some JCR node>);
  }

The archive implementations override getMetaInf to return some static setup:

  class MyArchive extends AbstractArchive {

      @Override
      public MetaInf getMetaInf() {
          DefaultMetaInf metaInf = new DefaultMetaInf();
          metaInf.setSettings(VaultSettings.createDefault());

          DefaultWorkspaceFilter includeAll = new DefaultWorkspaceFilter();
          includeAll.add(PathFilterSet.INCLUDE_ALL);
          metaInf.setFilter(includeAll);

          return metaInf;
      }

But it seems the Importer is simply the wrong corner of FileVault to
use when I want to keep a local directory in sync. AFAICS the Importer
is only used in the context of installing Packages. I'm going to try
the Mounter now to 'mount' a part of the local filesystem in a
repository, which then gives me access to a VaultFileSystem in which a
can start a Transaction.

best,
Mathijs

Reply via email to