Thorsten Scherler wrote:

El jue, 16-03-2006 a las 13:51 +0000, [EMAIL PROTECTED] escribió:

...
-
-                    // TODO allow to create other docs than xhtml
-                    resourceType = (ResourceType) selector.select("xhtml");
-                    documentManager.add(document, resourceType, "xml", 
doc.getName(), true, null);
+ + if("xml".equals(extension)){
+                        // FIXME allow to create other docs than xhtml - but 
how?
+                        resourceType = (ResourceType) selector.select("xhtml");
+                    }else{
+ // FIXME the following works only if the resource typ is called like the extension but normally + // that is not the case maybe there is a way to store which extension a resource type is + // treating and lookup a hashMap to get the real name via the extension
+                        if (selector.isSelectable(extension)){
+                            resourceType = (ResourceType) 
selector.select(extension);
+                        }else{
+                            //using a fallback resource type
+                            // FIXME this resource tye should be a more generic one like 
"media-assets" or "bin"
+                            resourceType = (ResourceType) 
selector.select("xhtml");
+                        }
+                      }
+                    documentManager.add(document, resourceType, extension, 
doc.getName(), true, null);


wdyt?

I think we need a registry configuration file (for WebDAV), where we can say which suffix corresponds to which resource type creator and also what resource type is being used if there is no suffix (e.g. XHTML or Folder resource type).

<config no-suffix="folder">
 <suffix resource-type="opendocument">odt</suffix>
<suffix resource-type="html">xhtml</suffix> <!-- What happens if it isn't well-formed or not valid??? -->
 <suffix resource-type="*"></suffix>
</config>

WDYT?

Michi

salu2


--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[EMAIL PROTECTED]                        [EMAIL PROTECTED]
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to