DaysSinceEpoch.fromYMD(2013, 1, 1),
autoImportSettings));
} else if ("importwavelet".equals(action)) {
SourceInstance instance =
sourceInstanceFactory.parseUnchecked(requireParameter(req, "instance"));
WaveId waveId = WaveId.deserialise(requireParameter(req, "waveid"));
WaveletId waveletId = WaveletId.deserialise(requireParameter(req, "waveletid"));
ImportWaveletTask task = new ImportWaveletTaskGsonImpl();
task.setInstance(instance.serialize());
task.setWaveId(waveId.serialise());
task.setWaveletId(waveletId.serialise());
ImportSettings settings = new ImportSettingsGsonImpl();
if ("private".equals(requireParameter(req, "sharingmode"))) {
settings.setSharingMode(ImportSettings.ImportSharingMode.PRIVATE);
} else if ("shared".equals(requireParameter(req, "sharingmode"))) {