Revision: 4062
Author:   solomax666
Date:     Tue Aug 16 08:16:57 2011
Log:      - FileProcessor is injected
http://code.google.com/p/openmeetings/source/detail?r=4062

Deleted:
 /branches/dev/injection/lib/junit/red5.jar
Modified:
/branches/dev/injection/WebContent/WEB-INF/openmeetings-applicationContext.xml /branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/FileExplorerUploadHandler.java /branches/dev/injection/src/fileservice/org/openmeetings/axis/services/FileService.java

=======================================
--- /branches/dev/injection/lib/junit/red5.jar  Sun Aug 14 12:12:21 2011
+++ /dev/null   
Binary file, no diff available.
=======================================
--- /branches/dev/injection/WebContent/WEB-INF/openmeetings-applicationContext.xml Mon Aug 15 11:47:14 2011 +++ /branches/dev/injection/WebContent/WEB-INF/openmeetings-applicationContext.xml Tue Aug 16 08:16:57 2011
@@ -114,6 +114,9 @@
                                <entry key="authLevelManagement">
                     <ref bean="authLevelManagement"/>
                 </entry>
+                               <entry key="fileProcessor">
+                    <ref bean="openmeetings.FileProcessor"/>
+                </entry>
                        </map>
                </property>
        </bean>
=======================================
--- /branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/FileExplorerUploadHandler.java Sat Aug 13 22:42:00 2011 +++ /branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/FileExplorerUploadHandler.java Tue Aug 16 08:16:57 2011
@@ -15,19 +15,19 @@
 import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;

 public class FileExplorerUploadHandler extends UploadHandler {
     private static final long serialVersionUID = 2848421357849982426L;
private static final Logger log = Red5LoggerFactory.getLogger(FileExplorerUploadHandler.class, ScopeApplicationAdapter.webAppRootKey);

        private FileExplorerItemDaoImpl fileExplorerItemDao;
+       private FileProcessor fileProcessor;

        @Override
        public void init(ServletConfig config) throws ServletException {
                super.init(config);
fileExplorerItemDao = (FileExplorerItemDaoImpl)config.getServletContext().getAttribute("fileExplorerItemDao"); + fileProcessor = (FileProcessor)config.getServletContext().getAttribute("fileProcessor");
        }

     @Override
@@ -67,10 +67,6 @@
         String fileSystemName = upload.getBaseFilename("Filedata");
         log.debug("fileSystemName: " + fileSystemName);

- ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
-
- FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
-
HashMap<String, HashMap<String, Object>> returnError = fileProcessor.processFile(userId, room_id_to_Store,
                        isOwner, is, parentFolderId, fileSystemName, 
current_dir, hs,
                        0L, ""); //externalFilesId, externalType
=======================================
--- /branches/dev/injection/src/fileservice/org/openmeetings/axis/services/FileService.java Mon Aug 15 11:47:14 2011 +++ /branches/dev/injection/src/fileservice/org/openmeetings/axis/services/FileService.java Tue Aug 16 08:16:57 2011
@@ -34,8 +34,6 @@
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;

 public class FileService {

@@ -48,6 +46,8 @@
        private FileExplorerItemDaoImpl fileExplorerItemDao;
        @Autowired
        private AuthLevelmanagement authLevelManagement;
+       @Autowired
+       private FileProcessor fileProcessor;

        public ServletContext getServletContext()
        {
@@ -95,9 +95,6 @@

                                String current_dir = 
getServletContext().getRealPath("/");

- ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); - FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
-
                        URL url = new URL(path);
                        URLConnection uc = url.openConnection();
InputStream inputstream = new BufferedInputStream(uc.getInputStream());
@@ -185,9 +182,6 @@

                                String current_dir = 
getServletContext().getRealPath("/");

- ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); - FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
-
                        URL url = new URL(path);
                        URLConnection uc = url.openConnection();
InputStream inputstream = new BufferedInputStream(uc.getInputStream());

--
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