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?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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

Reply via email to