em.createNamedQuery("resetRecordingProcessingStatus").setParameter("error", Status.ERROR).setParameter("processing", Status.PROCESSING).executeUpdate();
}
public RecordingContainerData getRecordingContainerData(long userId) {
try {
RecordingContainerData containerData = new RecordingContainerData();
// User Home Recordings
List<FlvRecording> homeFlvRecordings = getFlvRecordingRootByOwner(userId);
long homeFileSize = 0;
for (FlvRecording homeFlvRecording : homeFlvRecordings) {
homeFileSize += getRecordingSize(homeFlvRecording);
}
containerData.setUserHomeSize(homeFileSize);
// Public Recordings
long publicFileSize = 0;
//get all organizations the user can view
for (Organisation_Users ou : userDao.get(userId).getOrganisation_users()) {
List<FlvRecording>publicFlvRecordings = getFlvRecordingRootByPublic(ou.getOrganisation().getOrganisation_id());
//get sizes
for (FlvRecording publicFlvRecording : publicFlvRecordings) {
publicFileSize += getRecordingSize(publicFlvRecording);
}
}
containerData.setPublicFileSize(publicFileSize);
return containerData;
} catch (Exception ex2) {
log.error("[getRecordingContainerData]: ", ex2);
}