geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r757410 - /geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java
Date Mon, 23 Mar 2009 15:14:46 GMT
Author: gnodet
Date: Mon Mar 23 15:14:43 2009
New Revision: 757410

URL: http://svn.apache.org/viewvc?rev=757410&view=rev
Log:
Avoid the file content caching system as attributes may be changed externally

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java?rev=757410&r1=757409&r2=757410&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/MetaFileObject.java
Mon Mar 23 15:14:43 2009
@@ -22,7 +22,10 @@
 import org.apache.commons.vfs.FileContentInfoFactory;
 import org.apache.commons.vfs.FileName;
 import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.FileContent;
+import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.provider.AbstractFileObject;
+import org.apache.commons.vfs.provider.DefaultFileContent;
 import org.apache.geronimo.gshell.vfs.provider.meta.data.MetaData;
 
 import java.io.ByteArrayInputStream;
@@ -40,6 +43,7 @@
     private final MetaFileSystem fileSystem;
 
     private MetaData data;
+    private FileContent content;
 
     public MetaFileObject(final FileName fileName, final MetaFileSystem fileSystem) {
         super(fileName, fileSystem);
@@ -52,7 +56,7 @@
         if (data == null) {
             throw new IllegalStateException("Meta data has not been attached");
         }
-        
+
         return data;
     }
 
@@ -121,10 +125,18 @@
         if (data == null) {
             data = fileSystem.lookupData(this);
         }
+        content = new DefaultFileContent(this, getFileContentInfoFactory());
     }
 
     @Override
     protected void doDetach() throws Exception {
         data = null;
+        content = null;
+    }
+
+    @Override
+    public FileContent getContent() throws FileSystemException {
+        super.getContent();
+        return content;
     }
 }
\ No newline at end of file



Mime
View raw message