Revision: 3949
Author:   seba.wagner
Date:     Sun Jul  3 08:43:32 2011
Log:      Remove unused calls
http://code.google.com/p/openmeetings/source/detail?r=3949

Modified:
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceLibrary.java

=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceLibrary.java Sun Jul 3 04:58:24 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceLibrary.java Sun Jul 3 08:43:32 2011
@@ -206,328 +206,6 @@

         return size;
     }
-
-    /**
-     * @deprecated
-     * @param SID
-     * @param moduleName
-     * @param parentFolder
-     * @return
-     */
-    public LinkedHashMap<String, Object> getListOfFilesPlugin(String SID,
-            String moduleName, String parentFolder) {
-
- /*LinkedHashMap<String, Object> returnMap = new LinkedHashMap<String, Object>();
-
-        try {
-
- LinkedList<LinkedList<String>> filesMap = new LinkedList<LinkedList<String>>(); - LinkedList<LinkedList<String>> foldersMap = new LinkedList<LinkedList<String>>();
-            LinkedHashMap<String, LinkedHashMap> presentationObject = null;
-
- Long users_id = Sessionmanagement.getInstance().checkSession(SID); - Long user_level = Usermanagement.getInstance().getUserLevelByID(
-                    users_id);
-
-            log.debug("#############users_id : " + users_id);
-            log.debug("#############user_level : " + user_level);
-
- if (AuthLevelmanagement.getInstance().checkUserLevel(user_level)) {
-
-                String roomName = "files";
-
-                String current_dir = ScopeApplicationAdapter.webAppPath
-                        + File.separatorChar + "upload";
-                String working_dir = current_dir + File.separatorChar
-                        + roomName + parentFolder;
-                log.debug("#############working_dir : " + working_dir);
-
-                File dir = new File(working_dir);
-
-                // First get all Directories of this Folder
-                FilenameFilter ff = new FilenameFilter() {
-                    public boolean accept(File b, String name) {
-                        String absPath = b.getAbsolutePath()
-                                + File.separatorChar + name;
-                        File f = new File(absPath);
-                        return f.isDirectory();
-                    }
-                };
-
-                String[] allfolders = dir.list(ff);
-                if (allfolders != null) {
-                    for (int i = 0; i < allfolders.length; i++) {
- File file = new File(working_dir + File.separatorChar
-                                + allfolders[i]);
- Date lastModifiedDate = new Date(file.lastModified());
-                        String lastModified = formatDate(lastModifiedDate);
-                        String fileName = allfolders[i];
- log.debug("Found Folders, foldername: " + fileName); - LinkedList<String> fileInfo = new LinkedList<String>();
-                        fileInfo.add("");
-                        fileInfo.add("");
-                        fileInfo.add(fileName);
-                        fileInfo.add(lastModified);
-                        foldersMap.add(fileInfo);
-                    }
-                }
-
-                // Second get all Files of this Folder
-                FilenameFilter ff2 = new FilenameFilter() {
-                    public boolean accept(File b, String name) {
-                        String absPath = b.getAbsolutePath()
-                                + File.separatorChar + name;
-                        File f = new File(absPath);
-                        return f.isFile();
-                    }
-                };
-
-                String[] allfiles = dir.list(ff2);
-                if (allfiles != null) {
-                    for (int i = 0; i < allfiles.length; i++) {
- File file = new File(working_dir + File.separatorChar
-                                + allfiles[i]);
-
- log.debug("working_dir+File.separatorChar+allfiles[i]: "
-                                + working_dir
-                                + File.separatorChar
-                                + allfiles[i]);
-                        if (allfiles[i].startsWith("_thumb_")) {
-                            // log.error("Found Thumbs: "+allfiles[i]);
-                        } else {
-                            String lastModified = formatDate(new Date(
-                                    file.lastModified()));
-                            String fileName = allfiles[i];
-                            String fileBytes = new Long(file.length())
-                                    .toString();
-
- LinkedList<String> fileInfo = new LinkedList<String>();
-
-                            String fileNamePure = fileName.substring(0,
-                                    fileName.length() - 4);
-                            String fileNameExt = fileName.substring(
- fileName.length() - 4, fileName.length());
-                            String isimage = "y";
-                            StoredFile storedFile = new StoredFile(
- fileNamePure, fileNameExt.toLowerCase());
-                            if (storedFile.isPresentation())
-                                isimage = "n";
-                            log.debug("Found File, fileName: " + fileName);
-                            fileInfo.add(fileName);
-                            fileInfo.add(fileNamePure);
-                            fileInfo.add(fileNameExt);
-                            fileInfo.add(lastModified);
-                            fileInfo.add(fileBytes);
-                            fileInfo.add(isimage);
-                            filesMap.add(fileInfo);
-
-                            if (fileName
- .equals(CreateLibraryPresentation.libraryFileName)) { - presentationObject = LoadLibraryPresentation
-                                        .getInstance()
-                                        .parseLibraryFileToObject(
-                                                file.getAbsolutePath());
-                            }
-
-                        }
-                    }
-                }
-
-                returnMap.put("presentationObject", presentationObject);
-                returnMap.put("folders", foldersMap);
-                returnMap.put("files", filesMap);
-                returnMap.put("error", "");
-
-                return returnMap;
-            } else {
-                log.error("not Authentificated");
-                returnMap.put("error", "not authenificated");
-                return returnMap;
-            }
-
-        } catch (Exception e) {
-            log.error("[getListOfFilesByAbsolutePath]", e);
-            e.printStackTrace();
-            returnMap.put("error", e.getMessage());
-            return returnMap;
-        }*/
-
-       return null;
-
-    }
-
-    /**
-     * Method provide a List of Files-Object's
-     *
-     * @param SID
-     * @param moduleName
-     * @param parentFolder
-     * @param room
-     * @param domain
-     * @return
-     */
-    public LiberaryObject getListOfFilesObjectByAbsolutePath(String SID,
-            String moduleName, String parentFolder, Long room_id) {
-        LiberaryObject returnMap = new LiberaryObject();
-        try {
-            String current_dir = ScopeApplicationAdapter.webAppPath
-                    + File.separatorChar + "upload";
-
-            LinkedHashMap<String, LinkedHashMap> presentationObject = null;
-
- Long users_id = Sessionmanagement.getInstance().checkSession(SID); - Long user_level = Usermanagement.getInstance().getUserLevelByID(
-                    users_id);
-
-            log.debug("#############users_id : " + users_id);
-            log.debug("#############user_level : " + user_level);
-
- if (AuthLevelmanagement.getInstance().checkUserLevel(user_level)) {
-
-                String roomName = room_id.toString();
-                String working_dir = current_dir + File.separatorChar
-                        + roomName + parentFolder;
-                log.debug("#############working_dir : " + working_dir);
-
-                File dir = new File(working_dir);
-                // First get all Directories of this Folder
-                FilenameFilter ff = new FilenameFilter() {
-                    public boolean accept(File b, String name) {
-                        String absPath = b.getAbsolutePath()
-                                + File.separatorChar + name;
-                        File f = new File(absPath);
-                        return f.isDirectory();
-                    }
-                };
-
-                String[] allfolders = dir.list(ff);
-                if (allfolders != null && allfolders.length != 0) {
-                    log.debug("INIT setFoldersList");
- returnMap.setFoldersList(new LinkedList<FoldersObject>());
-                    for (int i = 0; i < allfolders.length; i++) {
- File file = new File(working_dir + File.separatorChar
-                                + allfolders[i]);
- Date lastModifiedDate = new Date(file.lastModified());
-                        String lastModified = formatDate(lastModifiedDate);
-                        String folderName = allfolders[i];
- log.debug("Found Folders, foldername: " + folderName);
-                        FoldersObject folderInfo = new FoldersObject();
-                        folderInfo.setFolderName(folderName);
-                        folderInfo.setLastModified(lastModified);
-                        returnMap.getFoldersList().add(folderInfo);
-                    }
-                }
-
-                // Secoond get all Files of this Folder
-                FilenameFilter ff2 = new FilenameFilter() {
-                    public boolean accept(File b, String name) {
-                        String absPath = b.getAbsolutePath()
-                                + File.separatorChar + name;
-                        File f = new File(absPath);
-                        return f.isFile();
-                    }
-                };
-
-                String[] allfiles = dir.list(ff2);
-                if (allfiles != null && allfiles.length != 0) {
-
-                    boolean isPresentation = false;
-                    // We need to split this up into 2 different process
-                    // because Axis cannot serialize the empty
- // LinkedList and also it makes no sense to iterate through - // all files if it is a Presentation-File which is handled
-                    // different
-                    for (int i = 0; i < allfiles.length; i++) {
- File file = new File(working_dir + File.separatorChar
-                                + allfiles[i]);
-
- log.debug("working_dir+File.separatorChar+allfiles[i]: "
-                                + working_dir
-                                + File.separatorChar
-                                + allfiles[i]);
-                        if (allfiles[i].startsWith("_thumb_")) {
-                            // log.error("Found Thumbs: "+allfiles[i]);
-                        } else {
-                            // String lastModified = formatDate(new
-                            // Date(file.lastModified()));
-                            String fileName = allfiles[i];
-
-                            if (fileName
- .equals(CreateLibraryPresentation.libraryFileName)) {
-                                isPresentation = true;
-                                // returnMap.setPresentationObject(new
-                                // PresentationObject());
-                                returnMap
-                                        
.setPresentationObject(LoadLibraryPresentationToObject
-                                                .getInstance()
-                                                .parseLibraryFileToObject(
- file.getAbsolutePath()));
-                            }
-
-                        }
-                    }
-
-                    // Only do this if it ain't a Presentation-File
-                    if (!isPresentation) {
-                        log.debug("INIT setFilesList");
- returnMap.setFilesList(new LinkedList<FilesObject>());
-                        for (int i = 0; i < allfiles.length; i++) {
-                            File file = new File(working_dir
-                                    + File.separatorChar + allfiles[i]);
-
- log.debug("working_dir+File.separatorChar+allfiles[i]: "
-                                    + working_dir
-                                    + File.separatorChar
-                                    + allfiles[i]);
-                            if (allfiles[i].startsWith("_thumb_")) {
-                                // log.error("Found Thumbs: "+allfiles[i]);
-                            } else {
-                                String lastModified = formatDate(new Date(
-                                        file.lastModified()));
-                                String fileName = allfiles[i];
-                                String fileBytes = new Long(file.length())
-                                        .toString();
-                                FilesObject fileInfo = new FilesObject();
-                                String fileNamePure = fileName.substring(0,
-                                        fileName.length() - 4);
-                                String fileNameExt = fileName.substring(
-                                        fileName.length() - 4,
-                                        fileName.length());
-                                String isimage = "y";
-                                StoredFile storedFile = new StoredFile(
- fileNamePure, fileNameExt.toLowerCase());
-                                if (storedFile.isPresentation())
-                                    isimage = "n";
- log.debug("Found File, fileName: " + fileName);
-                                fileInfo.setFileName(fileName);
-                                fileInfo.setFileNamePure(fileNamePure);
-                                fileInfo.setFileNameExt(fileNameExt);
-                                fileInfo.setLastModified(lastModified);
-                                fileInfo.setFileBytes(fileBytes);
-                                fileInfo.setIsimage(isimage);
-                                returnMap.getFilesList().add(fileInfo);
-                            }
-                        }
-                    }
-                }
-
-                returnMap.setError("");
-
-                return returnMap;
-            } else {
-                log.error("not Authentificated");
-                returnMap.setError("not authenificated");
-                return returnMap;
-            }
-
-        } catch (Exception e) {
-            log.error("[getListOfFilesByAbsolutePath]", e);
-            e.printStackTrace();
-            returnMap.setError(e.getMessage());
-            return returnMap;
-        }
-
-    }

     private String formatDate(Date date) {
         SimpleDateFormat formatter;

--
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en.

Reply via email to