String fileName = request.getParameter("fileName");
return fileName != null ? fileName : "";
}
private static WaveletName waveRef2WaveletName(String waveRefStr) {
WaveRef waveRef = null;
try {
waveRef = JavaWaverefEncoder.decodeWaveRefFromPath(waveRefStr);
} catch (InvalidWaveRefException e) {
LOG.warning("Cannot decode: " + waveRefStr, e);
return null;
}
WaveId waveId = waveRef.getWaveId();
WaveletId waveletId =
waveRef.getWaveletId() != null ? waveRef.getWaveletId() : WaveletId.of(waveId.getDomain(),
IdConstants.CONVERSATION_ROOT_WAVELET);
WaveletName waveletName = WaveletName.of(waveId, waveletId);
return waveletName;
}