use of org.bigbluebutton.api.domain.RecordingMetadata in project bigbluebutton by bigbluebutton.
the class RecordingService method deleteRecording.
public static void deleteRecording(File destDir, String recordingId, File recordingDir) {
File metadataXml = RecordingMetadataReaderHelper.getMetadataXmlLocation(recordingDir.getPath());
RecordingMetadata r = RecordingMetadataReaderHelper.getRecordingMetadata(metadataXml);
if (r != null) {
if (!destDir.exists())
destDir.mkdirs();
try {
FileUtils.moveDirectory(recordingDir, new File(destDir.getPath() + File.separatorChar + recordingId));
r.setState(Recording.STATE_DELETED);
r.setPublished(false);
File medataXmlFile = RecordingMetadataReaderHelper.getMetadataXmlLocation(destDir.getAbsolutePath() + File.separatorChar + recordingId);
// Process the changes by saving the recording into metadata.xml
RecordingMetadataReaderHelper.saveRecordingMetadata(medataXmlFile, r);
} catch (IOException e) {
log.error("Failed to delete recording : " + recordingId, e);
}
}
}
Aggregations