]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - legacy/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java
Remove legacy
[gpl/argeo-slc.git] / legacy / org.argeo.slc.support / src / org / argeo / slc / vfs / VfsResourceFactory.java
diff --git a/legacy/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java b/legacy/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java
deleted file mode 100644 (file)
index ac92adf..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.argeo.slc.vfs;
-
-import org.apache.commons.vfs2.CacheStrategy;
-import org.apache.commons.vfs2.FileSystemManager;
-import org.apache.commons.vfs2.impl.StandardFileSystemManager;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.core.io.Resource;
-
-public class VfsResourceFactory implements FactoryBean, InitializingBean {
-       private String url;
-       private FileSystemManager fileSystemManager;
-
-       public Object getObject() throws Exception {
-               return new VfsResource(fileSystemManager.resolveFile(url));
-       }
-
-       public Class<?> getObjectType() {
-               return Resource.class;
-       }
-
-       public boolean isSingleton() {
-               return false;
-       }
-
-       public void afterPropertiesSet() throws Exception {
-               if (fileSystemManager == null) {
-                       fileSystemManager = new StandardFileSystemManager();
-                       ((StandardFileSystemManager) fileSystemManager)
-                                       .setCacheStrategy(CacheStrategy.ON_RESOLVE);
-                       ((StandardFileSystemManager) fileSystemManager).init();
-               }
-
-       }
-
-}