You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2008/09/04 13:57:44 UTC

[jira] Created: (SLING-645) sling:superResourceType not taken into account for StarResource

sling:superResourceType not taken into account for StarResource
---------------------------------------------------------------

                 Key: SLING-645
                 URL: https://issues.apache.org/jira/browse/SLING-645
             Project: Sling
          Issue Type: Bug
          Components: Engine
            Reporter: Bertrand Delacretaz
            Priority: Minor


Given:

1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
2) /apps/foo having sling:resourceSuperType=bar
3) /realfoo having sling:resourceType=foo

Rendering results:
a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp

It seems like 2) is not taken into account for a StarResource.

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


[jira] Resolved: (SLING-645) sling:superResourceType not taken into account for StarResource

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

Felix Meschberger resolved SLING-645.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: JCR Resource 2.0.4

I have implemented the proposal in Rev. 699299.

Please close this issue if this works for you. Thanks.

> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
>                 Key: SLING-645
>                 URL: https://issues.apache.org/jira/browse/SLING-645
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Resource
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: JCR Resource 2.0.4
>
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.

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


[jira] Assigned: (SLING-645) sling:superResourceType not taken into account for StarResource

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

Felix Meschberger reassigned SLING-645:
---------------------------------------

    Assignee: Felix Meschberger

> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
>                 Key: SLING-645
>                 URL: https://issues.apache.org/jira/browse/SLING-645
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Resource
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: JCR Resource 2.0.4
>
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.

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


[jira] Updated: (SLING-645) sling:superResourceType not taken into account for StarResource

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

Felix Meschberger updated SLING-645:
------------------------------------

          Component/s:     (was: Engine)
                       JCR Resource
    Affects Version/s: JCR Resource 2.0.2

> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
>                 Key: SLING-645
>                 URL: https://issues.apache.org/jira/browse/SLING-645
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Resource
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: JCR Resource 2.0.4
>
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.

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


[jira] Commented: (SLING-645) sling:superResourceType not taken into account for StarResource

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

Felix Meschberger commented on SLING-645:
-----------------------------------------

A StarResource is a SyntheticResource but does not overwrite the base class getResourceSuperType method, hence the resource super type of a StarResource is always null.

To fix this, the StartResource should implement its own getResourceSuperType method similar to the JcrItemResource:

    private static final String UNSET_RESOURCE_SUPER_TYPE = "<unset>";
    private String resourceSuperType;
    public String getResourceSuperType() {
        if (resourceSuperType == UNSET_RESOURCE_SUPER_TYPE) {
            resourceSuperType = JcrResourceUtil.getResourceSuperType(this);
        }
        return resourceSuperType;
    }

WDYT ?

> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
>                 Key: SLING-645
>                 URL: https://issues.apache.org/jira/browse/SLING-645
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.

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


[jira] Commented: (SLING-645) sling:superResourceType not taken into account for StarResource

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631303#action_12631303 ] 

Bertrand Delacretaz commented on SLING-645:
-------------------------------------------

I agree with the proposed solution

> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
>                 Key: SLING-645
>                 URL: https://issues.apache.org/jira/browse/SLING-645
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.

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