You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/01/29 16:26:33 UTC

[jira] Created: (SLING-211) Improve support for standard nt:file and nt:resource nodes as well as similar nodes

Improve support for standard nt:file and nt:resource nodes as well as similar nodes
-----------------------------------------------------------------------------------

                 Key: SLING-211
                 URL: https://issues.apache.org/jira/browse/SLING-211
             Project: Sling
          Issue Type: Improvement
          Components: Resource
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: 2.0.0


Currently the JcrNodeResource class just supports special handling for nt:file nodes with respect to analyzing well known properties such as jcr:content/jcr:lastModified etc. and with respect to support adaptTo(InputStream.class).

This support should now be extended to nt:resource nodes or nodes which have properties analogous to nt:resource nodes, this encompasses the jcr:data, jcr:lastModified, jcr:mimeType and jcr:encoding properties. Of course, we may not rely on the nt:resource node type as the Jackrabbit Simple WebDAV support creates nt:unstructured nodes with the expected properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-211) Improve support for standard nt:file and nt:resource nodes as well as similar nodes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563617#action_12563617 ] 

Felix Meschberger commented on SLING-211:
-----------------------------------------

I extend JcrNodeResource, the Resource implementation for JCR Nodes to better support files:

* adaptTo(InputStream.class)

Let N be the jcr:content child node of the Resource's node if it happens to be a node of type nt:file. Otherwise let N be the Resource's node.

If node N has a jcr:data property, return the property as an InputStream.

Otherwise, get repeatedly primary item until either no primary item exists anymore or the primary item is a property. In the latter case, return the InputStream of that property.

Otherwise "fail" and return null.


* ResourceMetaData:

Let N be the jcr:content child node of the Resource's node if it happens to be a node of type nt:file. Otherwise let N be the Resource's node.

Set the resource metadata from node N as follows:

      sling.contentType --> N.getProperty("jcr:mimeType")
      sling.characterEncoding --> N.getProperty("jcr:encoding")
      sling.modificationTime --> N.getProperty("jcr:lastModified")

These properties are checked for existence regardless of the concrete type of node N.

Implemented in Rev. 616471.

> Improve support for standard nt:file and nt:resource nodes as well as similar nodes
> -----------------------------------------------------------------------------------
>
>                 Key: SLING-211
>                 URL: https://issues.apache.org/jira/browse/SLING-211
>             Project: Sling
>          Issue Type: Improvement
>          Components: Resource
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Currently the JcrNodeResource class just supports special handling for nt:file nodes with respect to analyzing well known properties such as jcr:content/jcr:lastModified etc. and with respect to support adaptTo(InputStream.class).
> This support should now be extended to nt:resource nodes or nodes which have properties analogous to nt:resource nodes, this encompasses the jcr:data, jcr:lastModified, jcr:mimeType and jcr:encoding properties. Of course, we may not rely on the nt:resource node type as the Jackrabbit Simple WebDAV support creates nt:unstructured nodes with the expected properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-211) Improve support for standard nt:file and nt:resource nodes as well as similar nodes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-211.
-----------------------------------

    Resolution: Fixed

Enhanced the LaunchpadDefaultServlet to support the Last-Modified and If-Modified-Since headers if the
resource to stream provides last modification time information.

Fixed in Rev. 616499.

> Improve support for standard nt:file and nt:resource nodes as well as similar nodes
> -----------------------------------------------------------------------------------
>
>                 Key: SLING-211
>                 URL: https://issues.apache.org/jira/browse/SLING-211
>             Project: Sling
>          Issue Type: Improvement
>          Components: Resource
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Currently the JcrNodeResource class just supports special handling for nt:file nodes with respect to analyzing well known properties such as jcr:content/jcr:lastModified etc. and with respect to support adaptTo(InputStream.class).
> This support should now be extended to nt:resource nodes or nodes which have properties analogous to nt:resource nodes, this encompasses the jcr:data, jcr:lastModified, jcr:mimeType and jcr:encoding properties. Of course, we may not rely on the nt:resource node type as the Jackrabbit Simple WebDAV support creates nt:unstructured nodes with the expected properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.