On 13.11.11 00:52, "Justin Edelson" <[email protected]> wrote:
>Indeed. I updated the gist to better reflect that situation. The idea
>is that the condition applies to that particular combination of
>adaptable/adapters, so in the case of InputStream (and
>PersistableValueMap), I broke those out into separate JSON objects.
>
>To be sure, I'm not confident we're going to be able to capture all
>the "condition" but I both think it is worth trying. I had thought of
>using a generic label like "notes" or "comments", but I think
>"condition" better identifies the content I think is most relevant.

What about this form, making use of Javascript objects:

{
    "adaptables": "org.apache.sling.api.resource.Resource",
    "adapters":[
        "javax.jcr.Node": "If the resource is a JcrNodeResource",
        "javax.jcr.Item": "If the resource is a JcrNodeResource",
        "java.net.URL": "If the resource is a JcrNodeResource",
        "java.util.Map": "If the resource is a JcrNodeResource",
        "org.apache.sling.api.resource.ValueMap": "If the resource is a
JcrNodeResource",
        "java.io.InputStream": "If the resource is a JcrNodeResource and
has a jcr:data property or in an nt:file node",
        "org.apache.sling.api.resource.PersistableValueMap": "If the
resource is a JcrNodeResource and the user has set property privileges on
the node"
    ]
}


Cheers,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel




Reply via email to