}
public void importData(String filename, Map settings) throws SerializerException
{
Map processSettings = getProcessSettings(settings);
JSSnapshot snapshot = null;
SerializerException snapshotException = null;
for (int i = 0; ((i < TAG_SNAPSHOT_NAMES.length) && (snapshot == null)); i++)
{
String snapshotTagName = TAG_SNAPSHOT_NAMES[i];
try
{
snapshot = readSnapshot(filename, snapshotTagName);
}
catch (SerializerException se)
{
if (snapshotException == null)
{
snapshotException = se;
}
}
}
if (snapshotException != null)
{
throw snapshotException;
}
else if (snapshot == null)
{
throw new SerializerException(SerializerException.FILE_PROCESSING_ERROR.create(new String[] { filename, "Snapshot is NULL" }));
}
if (!(snapshot.checkVersion()))
throw new SerializerException(SerializerException.INCOMPETIBLE_VERSION.create(new String[] { filename,
String.valueOf(snapshot.getSoftwareVersion()), String.valueOf(snapshot.getSavedSubversion()) }));
for (int i = 0, size = serializers.size(); i < size; i++)
{
((JetspeedComponentSerializer) serializers.get(i)).processImport(snapshot, processSettings);
}
}