Author: solomax Date: Wed Nov 25 04:08:02 2015 New Revision: 1716295 URL: http://svn.apache.org/viewvc?rev=1716295&view=rev Log: [OPENMEETINGS-1118] file service reworked (not finished)
Added: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java - copied, changed from r1716142, openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java - copied, changed from r1716294, openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java Removed: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/DownloadHandler.java openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/UploadController.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/Mp4RecordingResourceReference.java openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OggRecordingResourceReference.java openmeetings/branches/3.1.x/openmeetings-web/src/main/webapp/WEB-INF/classes/logback-config.xml openmeetings/branches/3.1.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java openmeetings/branches/3.1.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java openmeetings/branches/3.1.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java openmeetings/trunk/singlewebapp/openmeetings-core/pom.xml openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java openmeetings/trunk/singlewebapp/openmeetings-db/pom.xml openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java openmeetings/trunk/singlewebapp/openmeetings-flash/pom.xml openmeetings/trunk/singlewebapp/openmeetings-install/pom.xml openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java openmeetings/trunk/singlewebapp/openmeetings-screenshare/pom.xml openmeetings/trunk/singlewebapp/openmeetings-server/pom.xml openmeetings/trunk/singlewebapp/openmeetings-service/pom.xml openmeetings/trunk/singlewebapp/openmeetings-util/pom.xml openmeetings/trunk/singlewebapp/openmeetings-web/pom.xml openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/Mp4RecordingResourceReference.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OggRecordingResourceReference.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/web.xml openmeetings/trunk/singlewebapp/openmeetings-webservice/pom.xml openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/BaseConverter.java Wed Nov 25 04:08:02 2015 @@ -339,10 +339,10 @@ public abstract class BaseConverter { public void convertToMp4(Recording r, List<ConverterProcessResult> returnLog) throws IOException { //TODO add faststart, move filepaths to helpers - if (!isRecordingExists(r.getFileHash())) { + if (!isRecordingExists(r.getHash())) { return; } - File file = getRecording(r.getFileHash()); + File file = getRecording(r.getHash()); String path = file.getCanonicalPath(); String mp4path = path + MP4_EXTENSION; String[] argv = new String[] { Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java Wed Nov 25 04:08:02 2015 @@ -260,7 +260,7 @@ public class InterviewConverter extends recording.setFlvWidth(2 * flvWidth); recording.setFlvHeight(flvHeight); - recording.setFileHash(hashFileFullNameFlv); + recording.setHash(hashFileFullNameFlv); // Extract first Image for preview purpose // ffmpeg -i movie.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java Wed Nov 25 04:08:02 2015 @@ -144,7 +144,7 @@ public class RecordingConverter extends returnLog.add(ProcessHelper.executeScript("generateFullFLV", argv_fullFLV)); - recording.setFileHash(outputFullFlv.getName()); + recording.setHash(outputFullFlv.getName()); // Extract first Image for preview purpose // ffmpeg -i movie.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java Wed Nov 25 04:08:02 2015 @@ -61,7 +61,7 @@ public class FileProcessor { public ConverterProcessResultList processFile(Long userId, Long roomId, boolean isOwner, InputStream is, Long parentFolderId, String fileSystemName, - Long externalFileId, String externalType) throws Exception { + String externalFileId, String externalType) throws Exception { ConverterProcessResultList returnError = new ConverterProcessResultList(); Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileUtils.java Wed Nov 25 04:08:02 2015 @@ -48,19 +48,19 @@ public class FileUtils { File base = OmFileHelper.getUploadFilesDir(); if (Type.Image == file.getType()) { - File tFile = new File(base, file.getFileHash()); + File tFile = new File(base, file.getHash()); if (tFile.exists()) { fileSize += tFile.length(); } - File thumbFile = new File(base, thumbImagePrefix + file.getFileHash()); + File thumbFile = new File(base, thumbImagePrefix + file.getHash()); if (thumbFile.exists()) { fileSize += thumbFile.length(); } } if (Type.Presentation == file.getType()) { - File tFolder = new File(base, file.getFileHash()); + File tFolder = new File(base, file.getHash()); if (tFolder.exists()) { fileSize += OmFileHelper.getSize(tFolder); Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/documents/LoadLibraryPresentationToObject.java Wed Nov 25 04:08:02 2015 @@ -21,7 +21,7 @@ package org.apache.openmeetings.core.doc import java.util.Iterator; import java.util.LinkedList; -import org.apache.openmeetings.db.dto.file.FilesObject; +import org.apache.openmeetings.db.dto.file.FileExplorerItemDTO; import org.apache.openmeetings.db.dto.file.PresentationObject; import org.apache.openmeetings.util.OpenmeetingsVariables; import org.dom4j.Document; @@ -83,14 +83,14 @@ public class LoadLibraryPresentationToOb } } - public FilesObject createListObjectLibraryByFileDocument(Element fileElement){ + public FileExplorerItemDTO createListObjectLibraryByFileDocument(Element fileElement){ try { log.info("createListObjectLibraryByFileDocument"+fileElement); - FilesObject fileObject = new FilesObject(); - fileObject.setFileName(fileElement.getText()); - fileObject.setLastModified(fileElement.attribute("lastmod").getText()); - fileObject.setFileBytes(fileElement.attribute("size").getText()); + FileExplorerItemDTO fileObject = new FileExplorerItemDTO(); + fileObject.setName(fileElement.getText()); + //FIXME TODO fileObject.setLastModified(fileElement.attribute("lastmod").getText()); + //FIXME TODO fileObject.setSize(fileElement.attribute("size").getText()); return fileObject; } catch (Exception err) { log.error("createListObjectLibraryByFileDocument",err); @@ -98,20 +98,20 @@ public class LoadLibraryPresentationToOb return null; } - public LinkedList<FilesObject> createListObjectLibraryByFileDocumentThumbs(Element fileElement){ + public LinkedList<FileExplorerItemDTO> createListObjectLibraryByFileDocumentThumbs(Element fileElement){ try { - LinkedList<FilesObject> thumbMap = new LinkedList<FilesObject>(); + LinkedList<FileExplorerItemDTO> thumbMap = new LinkedList<FileExplorerItemDTO>(); for (@SuppressWarnings("unchecked") Iterator<Element> i = fileElement.elementIterator(); i.hasNext(); ) { Element thumbElement = i.next(); log.info("createListObjectLibraryByFileDocumentThumbs"+thumbElement); - FilesObject singleThumb = new FilesObject(); - singleThumb.setFileName(thumbElement.getName()); - singleThumb.setFileNamePure(thumbElement.getText()); - singleThumb.setLastModified(thumbElement.attribute("lastmod").getText()); - singleThumb.setFileBytes(thumbElement.attribute("size").getText()); + FileExplorerItemDTO singleThumb = new FileExplorerItemDTO(); + singleThumb.setName(thumbElement.getName()); + //FIXME TODO singleThumb.setFileNamePure(thumbElement.getText()); + //FIXME TODO singleThumb.setLastModified(thumbElement.attribute("lastmod").getText()); + //FIXME TODO singleThumb.setSize(thumbElement.attribute("size").getText()); thumbMap.add(singleThumb); } Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java Wed Nov 25 04:08:02 2015 @@ -145,7 +145,7 @@ public class ConferenceLibrary implement false, // isPresentation localFileName, // WML localFileName true, // isStoredWML file - true, 0L, ""); + true, "", ""); return fileExplorerId; } Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java Wed Nov 25 04:08:02 2015 @@ -99,8 +99,8 @@ public class RecordingService implements Recording recording = new Recording(); - recording.setFileHash(""); - recording.setFileName(roomRecordingName); + recording.setHash(""); + recording.setName(roomRecordingName); Long ownerId = client.getUserId(); if (ownerId != null && ownerId < 0) { User c = userDao.get(-ownerId); Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/DownloadHandler.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/DownloadHandler.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/DownloadHandler.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/DownloadHandler.java Wed Nov 25 04:08:02 2015 @@ -257,7 +257,7 @@ public class DownloadHandler extends Bas FileExplorerItem fileExplorerItem = getBean(FileExplorerItemDao.class).get(fileExplorerItemId); if (fileExplorerItem != null) { - fileNameResult = fileExplorerItem.getFileName().substring(0, fileExplorerItem.getFileName().length()-4) + fileNameResult = fileExplorerItem.getName().substring(0, fileExplorerItem.getName().length()-4) + fileNameResult.substring(fileNameResult.length()-4, fileNameResult.length()); } Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/UploadController.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/UploadController.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/UploadController.java (original) +++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/servlet/outputhandler/UploadController.java Wed Nov 25 04:08:02 2015 @@ -99,8 +99,7 @@ public class UploadController extends Ab isOwner = true; } - String parentFolderIdAsString = request - .getParameter("parentFolderId"); + String parentFolderIdAsString = request.getParameter("parentFolderId"); if (parentFolderIdAsString == null) { throw new ServletException("Missing parentFolderId ID"); } @@ -112,7 +111,7 @@ public class UploadController extends Ab ConverterProcessResultList returnError = fileProcessor .processFile(info.userId, room_id_to_Store, isOwner, is, - parentFolderId, info.filename, 0L, ""); // externalFilesId, externalType + parentFolderId, info.filename, "", ""); // externalFilesId, externalType UploadCompleteMessage uploadCompleteMessage = new UploadCompleteMessage(); uploadCompleteMessage.setUserId(info.userId); @@ -153,8 +152,8 @@ public class UploadController extends Ab if (Type.Presentation == fileExplorerItem.getType()) { msg.setIsPresentation(true); } - msg.setFileSystemName(fileExplorerItem.getFileName()); - msg.setFileHash(fileExplorerItem.getFileHash()); + msg.setFileSystemName(fileExplorerItem.getName()); + msg.setFileHash(fileExplorerItem.getHash()); } @RequestMapping(value = "/remotelog.upload", method = RequestMethod.POST) Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/file/FileExplorerItemDao.java Wed Nov 25 04:08:02 2015 @@ -42,293 +42,249 @@ import org.springframework.transaction.a @Transactional public class FileExplorerItemDao { - private static final Logger log = Red5LoggerFactory.getLogger(FileExplorerItemDao.class, webAppRootKey); + private static final Logger log = Red5LoggerFactory.getLogger(FileExplorerItemDao.class, webAppRootKey); @PersistenceContext private EntityManager em; - public Long add(String fileName, String fileHash, - Long parentItemId, Long ownerId, Long roomId, - Long insertedBy, Boolean isFolder, Boolean isImage, - Boolean isPresentation, String wmlFilePath, - Boolean isStoredWmlFile, Boolean isChart, - Long externalId, String externalType) { - log.debug(".add(): adding file " + fileName+ " roomID: "+roomId); - try { - FileExplorerItem fileItem = new FileExplorerItem(); - fileItem.setFileName(fileName); - fileItem.setFileHash(fileHash); - fileItem.setDeleted(false); - fileItem.setParentItemId(parentItemId); - fileItem.setOwnerId(ownerId); - fileItem.setRoomId(roomId); - fileItem.setInserted(new Date()); - fileItem.setInsertedBy(insertedBy); - Type t = null; - if (isStoredWmlFile) { - t = Type.WmlFile; - } - if (isChart) { - t = Type.PollChart; - } - if (isImage) { - t = Type.Image; - } - if (isPresentation) { - t = Type.Presentation; - } - if (isFolder) { - t = Type.Folder; - } - fileItem.setType(t); - fileItem.setUpdated(new Date()); - fileItem.setWmlFilePath(wmlFilePath); - fileItem.setExternalId(externalId); - fileItem.setExternalType(externalType); + public Long add(String fileName, String fileHash, Long parentId, Long ownerId, Long roomId, Long insertedBy, + Boolean isFolder, Boolean isImage, Boolean isPresentation, String wmlFilePath, Boolean isStoredWmlFile, + Boolean isChart, String externalId, String externalType) { + log.debug(".add(): adding file " + fileName + " roomID: " + roomId); + try { + FileExplorerItem fileItem = new FileExplorerItem(); + fileItem.setName(fileName); + fileItem.setHash(fileHash); + fileItem.setDeleted(false); + fileItem.setParentId(parentId); + fileItem.setOwnerId(ownerId); + fileItem.setRoomId(roomId); + fileItem.setInserted(new Date()); + fileItem.setInsertedBy(insertedBy); + Type t = null; + if (isStoredWmlFile) { + t = Type.WmlFile; + } + if (isChart) { + t = Type.PollChart; + } + if (isImage) { + t = Type.Image; + } + if (isPresentation) { + t = Type.Presentation; + } + if (isFolder) { + t = Type.Folder; + } + fileItem.setType(t); + fileItem.setUpdated(new Date()); + fileItem.setWmlFilePath(wmlFilePath); + fileItem.setExternalId(externalId); + fileItem.setExternalType(externalType); fileItem = em.merge(fileItem); Long fileItemId = fileItem.getId(); - log.debug(".add(): file " + fileName + " added as " + fileItemId); - return fileItemId; - } catch (Exception ex2) { - log.error(".add(): ", ex2); - } - return null; - } - - public Long addFileExplorerItem(FileExplorerItem fileItem) { - try { + log.debug(".add(): file " + fileName + " added as " + fileItemId); + return fileItemId; + } catch (Exception ex2) { + log.error(".add(): ", ex2); + } + return null; + } + + public Long addFileExplorerItem(FileExplorerItem fileItem) { + try { fileItem = em.merge(fileItem); Long fileItemId = fileItem.getId(); - return fileItemId; - } catch (Exception ex2) { - log.error("[addFileExplorerItem]", ex2); - } - return null; - } + return fileItemId; + } catch (Exception ex2) { + log.error("[addFileExplorerItem]", ex2); + } + return null; + } public List<FileExplorerItem> getFileExplorerItemsByRoomAndOwner(Long roomId, Long ownerId) { - log.debug(".getFileExplorerItemsByRoomAndOwner() started"); - try { + log.debug(".getFileExplorerItemsByRoomAndOwner() started"); + try { TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFilesByRoomAndOwner", FileExplorerItem.class); - query.setParameter("roomId",roomId); - query.setParameter("ownerId",ownerId); - + query.setParameter("roomId", roomId); + query.setParameter("ownerId", ownerId); + List<FileExplorerItem> fileExplorerList = query.getResultList(); - return fileExplorerList; - } catch (Exception ex2) { - log.error("[getFileExplorerItemsByRoomAndOwner]: ", ex2); - } - return null; - } + return fileExplorerList; + } catch (Exception ex2) { + log.error("[getFileExplorerItemsByRoomAndOwner]: ", ex2); + } + return null; + } - public List<FileExplorerItem> getByRoom(Long roomId) { - log.debug("getFileExplorerItemsByRoom roomId :: "+roomId); + public List<FileExplorerItem> getByRoom(Long roomId) { + log.debug("getFileExplorerItemsByRoom roomId :: " + roomId); TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFilesByRoom", FileExplorerItem.class); - query.setParameter("roomId",roomId); - + query.setParameter("roomId", roomId); + return query.getResultList(); - } + } - public List<FileExplorerItem> getByOwner(Long ownerId) { - log.debug(".getFileExplorerItemsByOwner() started"); + public List<FileExplorerItem> getByOwner(Long ownerId) { + log.debug("getByOwner() started"); TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFilesByOwner", FileExplorerItem.class); - query.setParameter("ownerId",ownerId); - - return query.getResultList(); - } + query.setParameter("ownerId", ownerId); - public List<FileExplorerItem> getByParent(Long parentId) { - log.debug(".getFileExplorerItemsByParent() started"); + return query.getResultList(); + } + + public List<FileExplorerItem> getByParent(Long parentId) { + log.debug("getByParent() started"); TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFilesByParent", FileExplorerItem.class); - query.setParameter("parentItemId", parentId); - - return query.getResultList(); - } - - public FileExplorerItem getFileExplorerItemsByHash(String hash) { - try { - - TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileByHash", FileExplorerItem.class); - query.setParameter("fileHash", hash); - - FileExplorerItem fileExplorerList = null; - try { - fileExplorerList = query.getSingleResult(); - } catch (NoResultException ex) { - } - - return fileExplorerList; - } catch (Exception ex2) { - log.error("[getFileExplorerItemsById]: ", ex2); - } - return null; - } - - public FileExplorerItem get(Long fileId) { - try { - - TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileById", FileExplorerItem.class); - query.setParameter("id", fileId); - - FileExplorerItem fileExplorerList = null; + query.setParameter("parentId", parentId); + + return query.getResultList(); + } + + public FileExplorerItem getByHash(String hash) { + log.debug("getByHash() started"); + FileExplorerItem f = null; + TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileByHash", FileExplorerItem.class); + query.setParameter("hash", hash); + + try { + f = query.getSingleResult(); + } catch (NoResultException ex) { + //no-op + } + return f; + } + + public FileExplorerItem get(Long id) { + FileExplorerItem f = null; + if (id != null && id > 0) { + TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileById", FileExplorerItem.class) + .setParameter("id", id); + try { - fileExplorerList = query.getSingleResult(); - } catch (NoResultException ex) { - } - - return fileExplorerList; - } catch (Exception ex2) { - log.error("[getFileExplorerItemsById]: ", ex2); - } - return null; - } - - public FileExplorerItem getFileExplorerItemsByExternalIdAndType(Long externalFileId, String externalType) { - log.debug(".getFileExplorerItemsByExternalIdAndType() started"); - - try { - TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileExternal", FileExplorerItem.class); - query.setParameter("externalFileId", externalFileId); - query.setParameter("externalType", externalType); - - FileExplorerItem fileExplorerList = null; + f = query.getSingleResult(); + } catch (NoResultException ex) { + } + } else { + log.info("[get] " + "Info: No id given"); + } + return f; + } + + public FileExplorerItem get(String externalId, String externalType) { + FileExplorerItem f = null; + log.debug("get started"); + + try { + TypedQuery<FileExplorerItem> query = em.createNamedQuery("getFileExternal", FileExplorerItem.class) + .setParameter("externalFileId", externalId).setParameter("externalType", externalType); + try { - fileExplorerList = query.getSingleResult(); - } catch (NoResultException ex) { - } - - return fileExplorerList; - } catch (Exception ex2) { - log.error("[getFileExplorerItemsByExternalIdAndType]: ", ex2); - } - return null; - } - - public List<FileExplorerItem> getFileExplorerItems() { - log.debug(".getFileExplorerItems() started"); - - try { - TypedQuery<FileExplorerItem> query = em.createNamedQuery("getAllFiles", FileExplorerItem.class); - - List<FileExplorerItem> fileExplorerList = query.getResultList(); - - return fileExplorerList; - } catch (Exception ex2) { - log.error("[getFileExplorerItems]: ", ex2); - } - return null; - } - - /** - * @param fileId - */ - public void delete(Long fileId) { - log.debug(".delete() started"); - delete(get(fileId)); - } - - public void delete(FileExplorerItem f) { - f.setDeleted(true); - f.setUpdated(new Date()); - - update(f); - } - - public void deleteFileExplorerItemByExternalIdAndType(Long externalFilesid, String externalType) { - log.debug(".deleteFileExplorerItemByExternalIdAndType() started"); - - try { - - FileExplorerItem fId = getFileExplorerItemsByExternalIdAndType(externalFilesid, externalType); - - if (fId == null) { - throw new Exception("externalFilesid: "+externalFilesid+" and externalType: "+externalType+" Not found"); - } - - fId.setDeleted(true); - fId.setUpdated(new Date()); - - update(fId); - } catch (Exception ex2) { - log.error("[deleteFileExplorerItemByExternalIdAndType]: ", ex2); - } - } - - /** - * @param fileId - * @param fileName - */ - public void updateFileOrFolderName(Long fileId, String fileName) { - log.debug(".updateFileOrFolderName() started"); - - try { - - FileExplorerItem fId = get(fileId); - - fId.setFileName(fileName); - fId.setUpdated(new Date()); - - update(fId); - } catch (Exception ex2) { - log.error("[updateFileOrFolderName]: ", ex2); - } - } + f = query.getSingleResult(); + } catch (NoResultException ex) { + } + + } catch (Exception ex2) { + log.error("[get]: ", ex2); + } + return f; + } + + public List<FileExplorerItem> get() { + log.debug("get started"); + + return em.createNamedQuery("getAllFiles", FileExplorerItem.class).getResultList(); + } + + public void delete(FileExplorerItem f) { + f.setDeleted(true); + f.setUpdated(new Date()); + + update(f); + } - public FileExplorerItem update(FileExplorerItem f) { - // fId.setUpdated(new Date()); + public void delete(String externalId, String externalType) { + log.debug("delete started"); + + delete(get(externalId, externalType)); + } + + /** + * @param id + * @param name + */ + public void updateFileOrFolderName(Long id, String name) { + log.debug(".updateFileOrFolderName() started"); + + try { + + FileExplorerItem fId = get(id); + + fId.setName(name); + fId.setUpdated(new Date()); + + update(fId); + } catch (Exception ex2) { + log.error("[updateFileOrFolderName]: ", ex2); + } + } + + public FileExplorerItem update(FileExplorerItem f) { + // fId.setUpdated(new Date()); if (f.getId() == null) { em.persist(f); - } else { - if (!em.contains(f)) { - f = em.merge(f); - } + } else { + if (!em.contains(f)) { + f = em.merge(f); + } } return f; - } + } - /** - * @param fileId - * @param newParentFileExplorerItemId - * @param isOwner - */ - public void moveFile(Long fileId, Long parentId, Long roomId, Boolean isOwner, Long ownerId) { - log.debug(".moveFile() started"); - try { - - FileExplorerItem fId = get(fileId); - - fId.setParentItemId(parentId); - - if (parentId == 0) { - if (isOwner) { - // move to personal Folder - fId.setOwnerId(ownerId); - } else { - // move to public room folder - fId.setOwnerId(null); - fId.setRoomId(roomId); - } - } else { - fId.setOwnerId(null); - } + /** + * @param fileId + * @param newParentFileExplorerItemId + * @param isOwner + */ + public void moveFile(Long fileId, Long parentId, Long roomId, Boolean isOwner, Long ownerId) { + log.debug(".moveFile() started"); + try { + + FileExplorerItem fId = get(fileId); + + fId.setParentId(parentId); + + if (parentId == 0) { + if (isOwner) { + // move to personal Folder + fId.setOwnerId(ownerId); + } else { + // move to public room folder + fId.setOwnerId(null); + fId.setRoomId(roomId); + } + } else { + fId.setOwnerId(null); + } - fId.setUpdated(new Date()); + fId.setUpdated(new Date()); if (fId.getId() == null) { em.persist(fId); - } else { - if (!em.contains(fId)) { - em.merge(fId); - } + } else { + if (!em.contains(fId)) { + em.merge(fId); + } } - } catch (Exception ex2) { - log.error("[updateFileOrFolderName]: ", ex2); - } - } + } catch (Exception ex2) { + log.error("[updateFileOrFolderName]: ", ex2); + } + } } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/RecordingDao.java Wed Nov 25 04:08:02 2015 @@ -77,7 +77,7 @@ public class RecordingDao { public Recording getByHash(String hash) { try { TypedQuery<Recording> query = em.createNamedQuery("getRecordingByHash", Recording.class); - query.setParameter("fileHash", hash); + query.setParameter("hash", hash); try { return query.getSingleResult(); @@ -85,7 +85,7 @@ public class RecordingDao { // noop } } catch (Exception ex2) { - log.error("[getRecordingByHash]: ", ex2); + log.error("[getByHash]: ", ex2); } return null; } @@ -280,8 +280,8 @@ public class RecordingDao { private long getSize(Recording r) { long size = 0; - if (isRecordingExists(r.getFileHash())) { - size += getRecording(r.getFileHash()).length(); + if (isRecordingExists(r.getHash())) { + size += getRecording(r.getHash()).length(); } if (isRecordingExists(r.getAlternateDownload())) { size += getRecording(r.getAlternateDownload()).length(); @@ -289,11 +289,11 @@ public class RecordingDao { if (isRecordingExists(r.getPreviewImage())) { size += getRecording(r.getPreviewImage()).length(); } - if (isRecordingExists(r.getFileHash() + MP4_EXTENSION)) { - size += getMp4Recording(r.getFileHash()).length(); + if (isRecordingExists(r.getHash() + MP4_EXTENSION)) { + size += getMp4Recording(r.getHash()).length(); } - if (isRecordingExists(r.getFileHash() + OGG_EXTENSION)) { - size += getOggRecording(r.getFileHash()).length(); + if (isRecordingExists(r.getHash() + OGG_EXTENSION)) { + size += getOggRecording(r.getHash()).length(); } for (Recording rec : getByParent(r.getId())) { size += getSize(rec); Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/UserDao.java Wed Nov 25 04:08:02 2015 @@ -240,17 +240,13 @@ public class UserDao implements IDataPro return u; } - public void delete(User u, Long userId) { - deleteUserID(u.getId()); - } - public User get(long id) { return get(id, false); } - private User get(long id, boolean force) { + private User get(Long id, boolean force) { User u = null; - if (id > 0) { + if (id != null && id > 0) { OpenJPAEntityManager oem = OpenJPAPersistence.cast(em); boolean qrce = oem.getFetchPlan().getQueryResultCacheEnabled(); oem.getFetchPlan().setQueryResultCacheEnabled(false); //FIXME update in cache during update @@ -273,35 +269,22 @@ public class UserDao implements IDataPro return u; } - public Long deleteUserID(long userId) { - try { - if (userId != 0) { - User us = get(userId); - for (GroupUser ou : us.getGroupUsers()){ - em.remove(ou); - } - us.setGroupUsers(null); - us.setDeleted(true); - us.setUpdated(new Date()); - us.setSipUser(null); - Address adr = us.getAddress(); - if (adr != null) { - adr.setDeleted(true); - } - - if (us.getId() == null) { - em.persist(us); - } else { - if (!em.contains(us)) { - em.merge(us); - } - } - return us.getId(); + public void delete(User u, Long userId) { + if (u != null && u.getId() != null) { + for (GroupUser ou : u.getGroupUsers()){ + em.remove(ou); + } + u.setGroupUsers(null); + u.setDeleted(true); + u.setUpdated(new Date()); + u.setSipUser(null); + Address adr = u.getAddress(); + if (adr != null) { + adr.setDeleted(true); } - } catch (Exception ex2) { - log.error("[deleteUserID]", ex2); + + update(u, userId); } - return null; } public List<User> get(Collection<Long> ids) { Copied: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java (from r1716142, openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java) URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java?p2=openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java&p1=openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java&r1=1716142&r2=1716295&rev=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FilesObject.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.java Wed Nov 25 04:08:02 2015 @@ -18,58 +18,132 @@ */ package org.apache.openmeetings.db.dto.file; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; + +import org.apache.openmeetings.db.entity.file.FileExplorerItem; +import org.apache.openmeetings.db.entity.file.FileItem.Type; + /** * This Object will represent a File on the File-System + * * @author sebastianwagner * */ -public class FilesObject { +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class FileExplorerItemDTO implements Serializable { + private static final long serialVersionUID = 1L; + private Long id; + private String name; + private Long parentId; + private Long roomId; + private Long size; + private String externalId; + private String externalType; + private Type type; + + public FileExplorerItemDTO() {} + + public FileExplorerItemDTO(FileExplorerItem f) { + id = f.getId(); + name = f.getName(); + parentId = f.getParentId(); + roomId = f.getRoomId(); + size = f.getSize(); + externalId = f.getExternalId(); + externalType = f.getExternalType(); + type = f.getType(); + } - private String fileName; - private String fileNamePure; - private String fileNameExt; - private String lastModified; - private String fileBytes; - private String isimage; + public FileExplorerItem get() { + FileExplorerItem f = new FileExplorerItem(); + f.setId(id); + f.setName(name); + f.setParentId(parentId); + f.setRoomId(roomId); + f.setSize(size); + f.setExternalId(externalId); + f.setExternalType(externalType); + f.setType(type); + return f; + } - public FilesObject() {} + public Long getId() { + return id; + } - public String getFileName() { - return fileName; + public void setId(Long id) { + this.id = id; + } + public String getName() { + return name; + } + + public void setName(String fileName) { + this.name = fileName; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; } - public void setFileName(String fileName) { - this.fileName = fileName; + + public Long getRoomId() { + return roomId; } - public String getFileNamePure() { - return fileNamePure; + + public void setRoomId(Long roomId) { + this.roomId = roomId; } - public void setFileNamePure(String fileNamePure) { - this.fileNamePure = fileNamePure; + + public Long getSize() { + return size; } - public String getFileNameExt() { - return fileNameExt; + + public void setSize(Long size) { + this.size = size; } - public void setFileNameExt(String fileNameExt) { - this.fileNameExt = fileNameExt; + + public String getExternalId() { + return externalId; } - public String getLastModified() { - return lastModified; + + public void setExternalId(String externalId) { + this.externalId = externalId; } - public void setLastModified(String lastModified) { - this.lastModified = lastModified; + + public String getExternalType() { + return externalType; } - public String getFileBytes() { - return fileBytes; + + public void setExternalType(String externalType) { + this.externalType = externalType; } - public void setFileBytes(String fileBytes) { - this.fileBytes = fileBytes; + + public Type getType() { + return type; } - public String getIsimage() { - return isimage; + + public void setType(Type type) { + this.type = type; } - public void setIsimage(String isimage) { - this.isimage = isimage; + + public static List<FileExplorerItemDTO> list(List<FileExplorerItem> l) { + List<FileExplorerItemDTO> list = new ArrayList<>(); + if (l != null) { + for (FileExplorerItem f : l) { + list.add(new FileExplorerItemDTO(f)); + } + } + return list; } - - } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LiberaryObject.java Wed Nov 25 04:08:02 2015 @@ -29,17 +29,17 @@ public class LiberaryObject { //These Objects here should only be initialized if needed, //an empty LinkedList thorws a ServiceInvokationTarget-Exception (makes no sense to me but it //is the way in Axis2 1.3 - private LinkedList<FilesObject> filesList; + private LinkedList<FileExplorerItemDTO> filesList; private LinkedList<FoldersObject> foldersList; private PresentationObject presentationObject; private String error; public LiberaryObject() {} - public LinkedList<FilesObject> getFilesList() { + public LinkedList<FileExplorerItemDTO> getFilesList() { return filesList; } - public void setFilesList(LinkedList<FilesObject> filesList) { + public void setFilesList(LinkedList<FileExplorerItemDTO> filesList) { this.filesList = filesList; } public LinkedList<FoldersObject> getFoldersList() { Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/LibraryPresentation.java Wed Nov 25 04:08:02 2015 @@ -19,37 +19,42 @@ package org.apache.openmeetings.db.dto.file; public class LibraryPresentation { - private LibraryPresentationFile originalDocument = null; private LibraryPresentationFile pdfDocument = null; private LibraryPresentationFile swfDocument = null; private LibraryPresenationThumbs thumbs = null; - + public LibraryPresentation() {} - + public LibraryPresentationFile getOriginalDocument() { return originalDocument; } + public void setOriginalDocument(LibraryPresentationFile originalDocument) { this.originalDocument = originalDocument; } + public LibraryPresentationFile getPdfDocument() { return pdfDocument; } + public void setPdfDocument(LibraryPresentationFile pdfDocument) { this.pdfDocument = pdfDocument; } + public LibraryPresentationFile getSwfDocument() { return swfDocument; } + public void setSwfDocument(LibraryPresentationFile swfDocument) { this.swfDocument = swfDocument; } + public LibraryPresenationThumbs getThumbs() { return thumbs; } + public void setThumbs(LibraryPresenationThumbs thumbs) { this.thumbs = thumbs; } - } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/file/PresentationObject.java Wed Nov 25 04:08:02 2015 @@ -26,35 +26,35 @@ import java.util.LinkedList; */ public class PresentationObject { - private FilesObject originalDocument; - private FilesObject pdfDocument; - private FilesObject swfDocument; - LinkedList<FilesObject> thumbs; + private FileExplorerItemDTO originalDocument; + private FileExplorerItemDTO pdfDocument; + private FileExplorerItemDTO swfDocument; + LinkedList<FileExplorerItemDTO> thumbs; public PresentationObject() {} - public FilesObject getOriginalDocument() { + public FileExplorerItemDTO getOriginalDocument() { return originalDocument; } - public void setOriginalDocument(FilesObject originalDocument) { + public void setOriginalDocument(FileExplorerItemDTO originalDocument) { this.originalDocument = originalDocument; } - public FilesObject getPdfDocument() { + public FileExplorerItemDTO getPdfDocument() { return pdfDocument; } - public void setPdfDocument(FilesObject pdfDocument) { + public void setPdfDocument(FileExplorerItemDTO pdfDocument) { this.pdfDocument = pdfDocument; } - public FilesObject getSwfDocument() { + public FileExplorerItemDTO getSwfDocument() { return swfDocument; } - public void setSwfDocument(FilesObject swfDocument) { + public void setSwfDocument(FileExplorerItemDTO swfDocument) { this.swfDocument = swfDocument; } - public LinkedList<FilesObject> getThumbs() { + public LinkedList<FileExplorerItemDTO> getThumbs() { return thumbs; } - public void setThumbs(LinkedList<FilesObject> thumbs) { + public void setThumbs(LinkedList<FileExplorerItemDTO> thumbs) { this.thumbs = thumbs; } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/record/RecordingDTO.java Wed Nov 25 04:08:02 2015 @@ -49,8 +49,8 @@ public class RecordingDTO implements Ser public RecordingDTO(Recording r) { this.id = r.getId(); - this.name = r.getFileName(); - this.flvName = r.getFileHash(); + this.name = r.getName(); + this.flvName = r.getHash(); this.aviName = r.getAlternateDownload(); this.roomId = r.getRoomId(); this.status = r.getStatus().name(); @@ -150,12 +150,12 @@ public class RecordingDTO implements Ser } public static List<RecordingDTO> list(List<Recording> l) { - List<RecordingDTO> rList = new ArrayList<RecordingDTO>(); + List<RecordingDTO> list = new ArrayList<>(); if (l != null) { for (Recording r : l) { - rList.add(new RecordingDTO(r)); + list.add(new RecordingDTO(r)); } } - return rList; + return list; } } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileExplorerItem.java Wed Nov 25 04:08:02 2015 @@ -34,17 +34,16 @@ import org.simpleframework.xml.Root; @NamedQueries({ @NamedQuery(name = "getAllFiles", query = "SELECT c FROM FileExplorerItem c ORDER BY c.id") , @NamedQuery(name = "getFileById", query = "SELECT c FROM FileExplorerItem c WHERE c.id = :id") - , @NamedQuery(name = "getFileByHash", query = "SELECT c FROM FileExplorerItem c WHERE c.fileHash = :fileHash") + , @NamedQuery(name = "getFileByHash", query = "SELECT c FROM FileExplorerItem c WHERE c.hash = :hash") , @NamedQuery(name = "getFilesByRoomAndOwner", query = "SELECT c FROM FileExplorerItem c WHERE c.deleted = false " - + " AND c.roomId = :roomId AND c.ownerId = :ownerId ORDER BY c.type ASC, c.fileName ") + + " AND c.roomId = :roomId AND c.ownerId = :ownerId ORDER BY c.type ASC, c.name ") , @NamedQuery(name = "getFilesByRoom", query = "SELECT c FROM FileExplorerItem c WHERE c.deleted = false AND c.roomId = :roomId " + - "AND c.ownerId IS NULL AND c.parentItemId IS NULL ORDER BY c.type ASC, c.fileName ") + "AND c.ownerId IS NULL AND c.parentId IS NULL ORDER BY c.type ASC, c.name ") , @NamedQuery(name = "getFilesByOwner", query = "SELECT c FROM FileExplorerItem c WHERE c.deleted = false AND c.ownerId = :ownerId " - + "AND c.parentItemId IS NULL ORDER BY c.type ASC, c.fileName ") + + "AND c.parentId IS NULL ORDER BY c.type ASC, c.name ") , @NamedQuery(name = "getFilesByParent", query = "SELECT c FROM FileExplorerItem c WHERE c.deleted = false " - + "AND c.parentItemId = :parentItemId ORDER BY c.type ASC, c.fileName ") - , @NamedQuery(name = "getFileExternal", query = "SELECT c FROM FileExplorerItem c WHERE c.externalFileId = :externalFileId " - + "AND c.externalType LIKE :externalType") + + "AND c.parentId = :parentId ORDER BY c.type ASC, c.name ") + , @NamedQuery(name = "getFileExternal", query = "SELECT c FROM FileExplorerItem c WHERE c.externalId = :externalId AND c.externalType LIKE :externalType") }) @Table(name = "fileexploreritem") @Root @@ -58,14 +57,14 @@ public class FileExplorerItem extends Fi @Column(name = "filesize") @Element(data = true, required = false) - private Long fileSize; + private Long size; @Column(name = "wml_file_path") @Element(data = true, required = false) private String wmlFilePath; - @Column(name = "external_file_id") - private Long externalId; + @Column(name = "external_id") + private String externalId; @Column(name = "external_type") private String externalType; @@ -78,12 +77,12 @@ public class FileExplorerItem extends Fi this.id = id; } - public Long getFileSize() { - return fileSize; + public Long getSize() { + return size; } - public void setFileSize(Long fileSize) { - this.fileSize = fileSize; + public void setSize(Long fileSize) { + this.size = fileSize; } public String getWmlFilePath() { @@ -94,11 +93,11 @@ public class FileExplorerItem extends Fi this.wmlFilePath = wmlFilePath; } - public Long getExternalId() { + public String getExternalId() { return externalId; } - public void setExternalId(Long externalId) { + public void setExternalId(String externalId) { this.externalId = externalId; } Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java Wed Nov 25 04:08:02 2015 @@ -39,17 +39,17 @@ public abstract class FileItem implement Folder, Image, PollChart, Presentation, Recording, Video, WmlFile } - @Column(name = "filename") - @Element(data = true, required = false) - private String fileName; - - @Column(name = "filehash") - @Element(data = true, required = false) - private String fileHash; + @Column(name = "name") + @Element(name = "fileName", data = true, required = false) + private String name; + + @Column(name = "hash") + @Element(name = "fileHash", data = true, required = false) + private String hash; - @Column(name = "parent_fileexploreritem_id") + @Column(name = "parent_item_id") @Element(data = true, name = "parentFileExplorerItemId", required = false) - private Long parentItemId; + private Long parentId; @Column(name = "room_id") @Element(data = true, required = false, name = "room_id") @@ -94,28 +94,28 @@ public abstract class FileItem implement @Enumerated(EnumType.STRING) private Type type; - public String getFileName() { - return fileName; + public String getName() { + return name; } - public void setFileName(String fileName) { - this.fileName = fileName; + public void setName(String name) { + this.name = name; } - public String getFileHash() { - return fileHash; + public String getHash() { + return hash; } - public void setFileHash(String fileHash) { - this.fileHash = fileHash; + public void setHash(String hash) { + this.hash = hash; } - public Long getParentItemId() { - return parentItemId; + public Long getParentId() { + return parentId; } - public void setParentItemId(Long parentItemId) { - this.parentItemId = parentItemId; + public void setParentId(Long parentId) { + this.parentId = parentId; } public Long getRoomId() { Modified: openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java (original) +++ openmeetings/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/Recording.java Wed Nov 25 04:08:02 2015 @@ -66,18 +66,18 @@ import org.simpleframework.xml.Root; @Entity @NamedQueries({ @NamedQuery(name = "getRecordingById", query = "SELECT f FROM Recording f WHERE f.id = :id") - , @NamedQuery(name = "getRecordingByHash", query = "SELECT f FROM Recording f WHERE f.fileHash = :fileHash") + , @NamedQuery(name = "getRecordingByHash", query = "SELECT f FROM Recording f WHERE f.hash = :hash") , @NamedQuery(name = "getRecordingsByExternalUser", query = "SELECT c FROM Recording c, User u " + "WHERE c.insertedBy = u.id AND u.externalId = :externalId AND u.externalType = :externalType " + "AND c.deleted = false") , @NamedQuery(name = "getRecordingsPublic", query = "SELECT f FROM Recording f WHERE f.deleted = false AND f.ownerId IS NULL " - + "AND f.groupId IS NULL AND (f.parentItemId IS NULL OR f.parentItemId = 0) " + + "AND f.groupId IS NULL AND (f.parentId IS NULL OR f.parentId = 0) " + "ORDER BY f.type DESC, f.inserted") , @NamedQuery(name = "getRecordingsByGroup", query = "SELECT f FROM Recording f WHERE f.deleted = false AND f.ownerId IS NULL " - + "AND f.groupId = :groupId AND (f.parentItemId IS NULL OR f.parentItemId = 0) " + + "AND f.groupId = :groupId AND (f.parentId IS NULL OR f.parentId = 0) " + "ORDER BY f.type DESC, f.inserted") , @NamedQuery(name = "getRecordingsByOwner", query = "SELECT f FROM Recording f WHERE f.deleted = false AND f.ownerId = :ownerId " - + "AND (f.parentItemId IS NULL OR f.parentItemId = 0) " + + "AND (f.parentId IS NULL OR f.parentId = 0) " + "ORDER BY f.type DESC, f.inserted") , @NamedQuery(name = "resetRecordingProcessingStatus", query = "UPDATE Recording f SET f.status = :error WHERE f.status IN (:recording, :converting)") , @NamedQuery(name = "getRecordingsAll", query = "SELECT c FROM Recording c LEFT JOIN FETCH c.metaData ORDER BY c.id") @@ -87,7 +87,7 @@ import org.simpleframework.xml.Root; + "AND r.externalType LIKE :externalType AND c.deleted = false") , @NamedQuery(name = "getRecordingsByRoom", query = "SELECT c FROM Recording c WHERE c.deleted = false AND c.roomId = :roomId " + "ORDER BY c.type ASC, c.inserted") - , @NamedQuery(name = "getRecordingsByParent", query = "SELECT f FROM Recording f WHERE f.deleted = false AND f.parentItemId = :parentId " + , @NamedQuery(name = "getRecordingsByParent", query = "SELECT f FROM Recording f WHERE f.deleted = false AND f.parentId = :parentId " + "ORDER BY f.type ASC, f.inserted") , @NamedQuery(name = "getRecordingsByExternalType", query = "SELECT rec FROM Recording rec, Room r, User u " + "WHERE rec.deleted = false AND rec.roomId = r.id AND rec.insertedBy = u.id " Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx (original) +++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx Wed Nov 25 04:08:02 2015 @@ -25,16 +25,14 @@ Class fileExplorer --> <class name="fileExplorer" extends="view" > - <dataset name="getFileExplorerByRoomSelf" type="http" > - <handler name="ondata" args="d"> - <![CDATA[ - if ($debug) Debug.write("ondata 1 ",this.src); - if ($debug) Debug.write("ondata 2 ",d); - parent.parseRootItems(parent.parseRootToRoomObject(d)); - ]]> - </handler> - </dataset> - + <switch> + <when property="$as3"> + <passthrough> + import flash.events.*; + import flash.net.*; + </passthrough> + </when> + </switch> <attribute name="parentFolderId" value="-2" type="number" /> <attribute name="_selected" value="null" /> @@ -169,7 +167,26 @@ <method name="loadFiles"> <![CDATA[ - if ($debug) Debug.write("loadFiles ", this, this.getFileExplorerByRoomSelf); + if ($debug) Debug.write("loadFiles "); + + var requestor:URLLoader = new URLLoader(); + var request:URLRequest = new URLRequest( "http://service.example.com/" ); + request.method = URLRequestMethod.GET; + + //Add the URL variables + var variables:URLVariables = new URLVariables(); + variables.method = "test.echo"; + variables.api_key = "123456ABC"; + variables.message = "Able was I, ere I saw Elba."; + request.data = variables; + + //Initiate the transaction + requestor = new URLLoader(); + requestor.addEventListener(Event.COMPLETE, httpRequestComplete); + requestor.addEventListener(IOErrorEvent.IOERROR, httpRequestError); + requestor.addEventListener(SecurityErrorEvent.SECURITY_ERROR, httpRequestError); + requestor.load( request ); + /* FIXME TODO //this.getFileExplorerByRoom.doCall(); var downloadurl = canvas.getUrl()+'services/FileService/getFileExplorerByRoomSelfInternal?' @@ -183,7 +200,13 @@ */ ]]> </method> + + <method name="httpRequestComplete" args="event"> + </method> + <method name="httpRequestError" args="event"> + </method> + <method name="parseParentToRoomObject" args="dObj"> <![CDATA[ Modified: openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java (original) +++ openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupExport.java Wed Nov 25 04:08:02 2015 @@ -288,7 +288,7 @@ public class BackupExport { * ##################### File-Explorer */ { - List<FileExplorerItem> list = fileExplorerItemDao.getFileExplorerItems(); + List<FileExplorerItem> list = fileExplorerItemDao.get(); Registry registry = new Registry(); Strategy strategy = new RegistryStrategy(registry); Serializer serializer = new Persister(strategy); Modified: openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java (original) +++ openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java Wed Nov 25 04:08:02 2015 @@ -592,8 +592,8 @@ public class BackupImport { if (file.getOwnerId() != null) { file.setOwnerId(usersMap.get(file.getOwnerId())); } - if (file.getParentItemId() != null && file.getParentItemId() <= 0L) { - file.setParentItemId(null); + if (file.getParentId() != null && file.getParentId() <= 0L) { + file.setParentId(null); } fileExplorerItemDao.addFileExplorerItem(file); } Modified: openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java (original) +++ openmeetings/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java Wed Nov 25 04:08:02 2015 @@ -369,7 +369,7 @@ public class Admin { deleted = 0; for (File f : files.listFiles()) { long fSize = OmFileHelper.getSize(f); - FileExplorerItem item = fileDao.getFileExplorerItemsByHash(f.getName()); + FileExplorerItem item = fileDao.getByHash(f.getName()); if (item == null) { if (cleanup) { FileHelper.removeRec(f); @@ -385,8 +385,8 @@ public class Admin { } } missing = 0; - for (FileExplorerItem item : fileDao.getFileExplorerItems()) { - if (!item.isDeleted() && item.getFileHash() != null && !new File(files, item.getFileHash()).exists()) { + for (FileExplorerItem item : fileDao.get()) { + if (!item.isDeleted() && item.getHash() != null && !new File(files, item.getHash()).exists()) { missing++; } } @@ -414,7 +414,7 @@ public class Admin { RecordingDao recordDao = getApplicationContext(ctxName).getBean(RecordingDao.class); long[] params = {0, 0}; // [0] == deleted [1] == missing for (Recording rec : recordDao.get()) { - checkRecordingFile(hibernateDir, rec.getFileHash(), rec.isDeleted(), params, cleanup); + checkRecordingFile(hibernateDir, rec.getHash(), rec.isDeleted(), params, cleanup); checkRecordingFile(hibernateDir, rec.getAlternateDownload(), rec.isDeleted(), params, cleanup); checkRecordingFile(hibernateDir, rec.getPreviewImage(), rec.isDeleted(), params, cleanup); } Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/ConvertingErrorsDialog.java Wed Nov 25 04:08:02 2015 @@ -83,10 +83,10 @@ public class ConvertingErrorsDialog exte protected void onOpen(IPartialPageRequestHandler handler) { Recording f = getModelObject(); List<RecordingLog> logs = getBean(RecordingLogDao.class).getByRecordingId(f.getId()); - if (f.getFileHash() == null) { + if (f.getHash() == null) { message.setVisible(true); message.setDefaultModelObject(Application.getString(888)); - } else if (!isRecordingExists(f.getFileHash() + MP4_EXTENSION)) { + } else if (!isRecordingExists(f.getHash() + MP4_EXTENSION)) { message.setVisible(true); message.setDefaultModelObject(Application.getString(1595)); } else { Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemPanel.java Wed Nov 25 04:08:02 2015 @@ -40,7 +40,7 @@ public class FileItemPanel extends Folde if (model.getObject() instanceof Recording) { Recording r = (Recording)model.getObject(); long errorCount = getBean(RecordingLogDao.class).countErrors(r.getId()); - boolean visible = errorCount != 0 || (Status.RECORDING != r.getStatus() && Status.CONVERTING != r.getStatus() && !isRecordingExists(r.getFileHash() + MP4_EXTENSION)); + boolean visible = errorCount != 0 || (Status.RECORDING != r.getStatus() && Status.CONVERTING != r.getStatus() && !isRecordingExists(r.getHash() + MP4_EXTENSION)); errors.add(new AjaxEventBehavior("click") { private static final long serialVersionUID = 1L; Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileItemTree.java Wed Nov 25 04:08:02 2015 @@ -107,7 +107,7 @@ public class FileItemTree<T extends File case Recording: { Recording r = (Recording)f; - if (isRecordingExists(r.getFileHash() + MP4_EXTENSION)) { + if (isRecordingExists(r.getHash() + MP4_EXTENSION)) { style = "recording om-icon"; } else if (Status.RECORDING == r.getStatus() || Status.CONVERTING == r.getStatus()) { style = "processing-recording om-icon"; @@ -150,7 +150,7 @@ public class FileItemTree<T extends File @Override protected IModel<String> newLabelModel(IModel<T> model) { - return Model.of(model.getObject().getFileName()); + return Model.of(model.getObject().getName()); } }; } Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java Wed Nov 25 04:08:02 2015 @@ -146,14 +146,14 @@ public abstract class FileTreePanel exte public void createRecordingFolder(String name) { Recording f = new Recording(); - f.setFileName(name); + f.setName(name); f.setInsertedBy(getUserId()); f.setInserted(new Date()); f.setType(Type.Folder);; Recording p = (Recording)selectedFile.getObject(); long parentId = p.getId(); if (Type.Folder == p.getType()) { - f.setParentItemId(parentId); + f.setParentId(parentId); } f.setOwnerId(p.getOwnerId()); f.setGroupId(p.getGroupId()); Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FolderPanel.java Wed Nov 25 04:08:02 2015 @@ -71,7 +71,7 @@ public class FolderPanel extends Panel { if (pid == f.getId()) { return; } - f.setParentItemId(pid > 0 ? pid : null); + f.setParentId(pid > 0 ? pid : null); f.setOwnerId(p.getOwnerId()); f.setRoomId(p.getRoomId()); if (f instanceof Recording) { @@ -102,7 +102,7 @@ public class FolderPanel extends Panel { d.add(AttributeAppender.append("class", r instanceof Recording ? "recorditem" : "fileitem")); drag = d; } - drag.add(r.getId() < 1 ? new Label("name", r.getFileName()) : new AjaxEditableLabel<String>("name", Model.of(model.getObject().getFileName())) { + drag.add(r.getId() < 1 ? new Label("name", r.getName()) : new AjaxEditableLabel<String>("name", Model.of(model.getObject().getName())) { private static final long serialVersionUID = 1L; @Override @@ -114,7 +114,7 @@ public class FolderPanel extends Panel { protected void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); FileItem fi = model.getObject(); - fi.setFileName(getEditor().getModelObject()); + fi.setName(getEditor().getModelObject()); if (fi instanceof Recording) { getBean(RecordingDao.class).update((Recording)fi); } else { Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/MyRecordingTreeProvider.java Wed Nov 25 04:08:02 2015 @@ -36,7 +36,7 @@ public class MyRecordingTreeProvider ext Recording r = new Recording(); r.setId(0L); r.setType(Type.Folder); - r.setFileName(Application.getString(860)); + r.setName(Application.getString(860)); r.setOwnerId(getUserId()); return Arrays.asList(r).iterator(); } Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/PublicRecordingTreeProvider.java Wed Nov 25 04:08:02 2015 @@ -45,7 +45,7 @@ public class PublicRecordingTreeProvider r.setOwnerId(null); r.setType(Type.Folder); String pub = Application.getString(861); - r.setFileName(groupId == null ? pub : String.format("%s (%s)", pub, name)); + r.setName(groupId == null ? pub : String.format("%s (%s)", pub, name)); return Arrays.asList(r).iterator(); } Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.html Wed Nov 25 04:08:02 2015 @@ -24,7 +24,7 @@ <table> <tr> <td><wicket:message key="863"/></td> - <td><span wicket:id="fileName"></span></td> + <td><span wicket:id="name"></span></td> </tr> <tr> <td><wicket:message key="864"/></td> Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoInfo.java Wed Nov 25 04:08:02 2015 @@ -88,7 +88,7 @@ public class VideoInfo extends Panel { add(form.setOutputMarkupId(true)); setDefaultModel(rm); - form.add(new Label("fileName"), new Label("duration"), new Label("recordEnd"), new Label("roomName", roomName), + form.add(new Label("name"), new Label("duration"), new Label("recordEnd"), new Label("roomName", roomName), downloadBtn.setEnabled(false), reConvert.setEnabled(false)); add(download); update(null, r); @@ -125,7 +125,7 @@ public class VideoInfo extends Panel { } } reConvert.setEnabled(reConvEnabled); - downloadBtn.setEnabled(isRecordingExists(r.getAlternateDownload()) || isRecordingExists(r.getFileHash())); + downloadBtn.setEnabled(isRecordingExists(r.getAlternateDownload()) || isRecordingExists(r.getHash())); if (target != null) { target.add(form); } @@ -178,8 +178,8 @@ public class VideoInfo extends Panel { @Override public void onClick(AjaxRequestTarget target) { - download.setFileName(rm.getObject().getFileHash()); - download.setResourceStream(new FileResourceStream(getRecording(rm.getObject().getFileHash()))); + download.setFileName(rm.getObject().getHash()); + download.setResourceStream(new FileResourceStream(getRecording(rm.getObject().getHash()))); download.initiate(target); } }); Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/VideoPlayer.java Wed Nov 25 04:08:02 2015 @@ -60,7 +60,7 @@ public class VideoPlayer extends Panel { } public VideoPlayer update(AjaxRequestTarget target, Recording r) { - boolean videoExists = r != null && getMp4Recording(r.getFileHash()).exists(); + boolean videoExists = r != null && getMp4Recording(r.getHash()).exists(); if (videoExists) { PageParameters pp = new PageParameters().add("id", r.getId()); mp4.setPageParameters(pp); Modified: openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java?rev=1716295&r1=1716294&r2=1716295&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java (original) +++ openmeetings/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/FlvRecordingResourceReference.java Wed Nov 25 04:08:02 2015 @@ -38,11 +38,11 @@ public class FlvRecordingResourceReferen @Override String getFileName(Recording r) { - return r.getFileHash(); + return r.getHash(); } @Override File getFile(Recording r) { - return getRecording(r.getFileHash()); + return getRecording(r.getHash()); } }