king
I'm new here

Importing resources to FirstSpirit

Dear Community,

I wonder what is the difference between the following FirstSpirit ACCESS-API calls:

  1. de.espirit.firstspirit.access.store.StoreElement.importStoreElement(ZipFile, ImportHandler)
  2. de.espirit.firstspirit.access.store.StoreElement.importStoreElements(ZipFile, ImportHandler)

When importing a ZipFile resource, 2.) just returns just ONE ELEMENT in the LIST (the same FS-ID, the 1.) method returns).

So, why the second method at all??

0 Kudos
5 Replies
marro
Crownpeak employee

de.espirit.firstspirit.access.store.StoreElement.importStoreElement(ZipFile, ImportHandler) only imports the first StoreElement found in the given ZipFile, and returns its FS-ID.

de.espirit.firstspirit.access.store.StoreElement.importStoreElements(ZipFile, ImportHandler) imports every StoreElement found in the given ZipFile and should return a list of FS-IDs.

0 Kudos

Dear Donato,

we read the JavaDoc documentation - but especially the 2nd method did not behave as described at runtime. So, importing a ZipFile having more than one StoreElement included, did not return a list of FS-IDs to the caller. It just returns the first node of the imported FirstSpirit tree hierarchy.

0 Kudos

The correct wording is "if a zip file contains more than one root node".

Peter
0 Kudos

Hi Peter,

if your hint would be available in the JavaDoc of the corresponding method I'm sure it would not just help me but others.

Might it be possible to integrate it there?

0 Kudos

done

Peter