]> source.dussan.org Git - poi.git/commitdiff
getters and setters for ClassID - addendum to bug 22195, by Kirill Jacobson
authorAvik Sengupta <avik@apache.org>
Sat, 1 Nov 2003 02:20:51 +0000 (02:20 +0000)
committerAvik Sengupta <avik@apache.org>
Sat, 1 Nov 2003 02:20:51 +0000 (02:20 +0000)
sync from branch

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353431 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java
src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java

index 135a2ba4e25095be9d3d3201107e82636504a46b..a85e7e9cb82917b0a22613ceb6d7559bde056a5f 100644 (file)
@@ -59,6 +59,8 @@ import java.io.*;
 
 import java.util.*;
 
+import org.apache.poi.hpsf.ClassID;
+
 /**
  * This interface defines methods specific to Directory objects
  * managed by a Filesystem instance.
@@ -160,5 +162,20 @@ public interface DirectoryEntry
 
     public DirectoryEntry createDirectory(final String name)
         throws IOException;
+
+    /**
+     * Gets the storage clsid of the directory entry
+     *
+     * @return storage Class ID
+     */
+    public ClassID getStorageClsid();
+
+    /**
+     * Sets the storage clsid for the directory entry
+     *
+     * @param clsidStorage storage Class ID
+     */
+    public void setStorageClsid(ClassID clsidStorage);
+
 }   // end public interface DirectoryEntry
 
index d7c670c25287f4aae7d1f7466c02eccc1e5bab80..feeb74771d9687ba1a56a217b2409d1a57eb7c17 100644 (file)
@@ -59,6 +59,7 @@ import java.io.*;
 
 import java.util.*;
 
+import org.apache.poi.hpsf.ClassID;
 import org.apache.poi.poifs.dev.POIFSViewable;
 import org.apache.poi.poifs.property.DirectoryProperty;
 import org.apache.poi.poifs.property.DocumentProperty;
@@ -346,6 +347,26 @@ public class DirectoryNode
         return rval;
     }
 
+    /**
+     * Gets the storage clsid of the directory entry
+     *
+     * @return storage Class ID
+     */
+    public ClassID getStorageClsid()
+    {
+        return getProperty().getStorageClsid();
+    }
+
+    /**
+     * Sets the storage clsid for the directory entry
+     *
+     * @param clsidStorage storage Class ID
+     */
+    public void setStorageClsid(ClassID clsidStorage)
+    {
+        getProperty().setStorageClsid(clsidStorage);
+    }
+
     /* **********  END  implementation of DirectoryEntry ********** */
     /* ********** START implementation of Entry ********** */
 
index 3d173aa46ec5df970c51d42a297429e86c76518b..3a62e3e1f0f3e214190b51ce62438b427cf42459 100644 (file)
@@ -423,6 +423,8 @@ public class POIFSFileSystem
                 DirectoryNode new_dir =
                     ( DirectoryNode ) parent.createDirectory(name);
 
+                new_dir.setStorageClsid( property.getStorageClsid() );
+
                 processProperties(
                     small_blocks, big_blocks,
                     (( DirectoryProperty ) property).getChildren(), new_dir);