sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Bailey <Jason.Bai...@sas.com>
Subject RE: Search for specific resource types
Date Fri, 12 Jan 2018 14:19:33 GMT
So that I understand, this would benefit a scenario where you are searching for a specific
resource type, and the search implementation would have to traverse up the resourceType hierarchy
to determine if a specific type was of a type that you are looking for.

One of the solutions for this, as you suggest, could be a pre-emptive determination of the
derived types and then the search implementation could compare against that. 

Did I get that right?

-----Original Message-----
From: Konrad Windszus [mailto:konrad_w@gmx.de] 
Sent: Friday, January 12, 2018 5:46 AM
To: dev@sling.apache.org
Subject: Re: Search for specific resource types

EXTERNAL

Ping, does anyone have any idea?

I am thinking about introducing a new method to ResourceResolver which allows to return all
derived resource types for a given resource type. That must internally rely on a search within
/apps and /libs looking for resourceSuperType=<given type> recursively!

Such a method could be used as a basis for the query to look for content of type "a" or a
derived type.
WDYT?

Konrad

> On 15. Dec 2017, at 16:59, Konrad Windszus <konrad_w@gmx.de> wrote:
>
> Hi,
> is there a simple way to search with Sling Resource API for resources which have a certain
resource type "a" or a resource type derived from "a".
> The resource type inheritance in Sling is a pretty powerful concept. I am wondering how
to properly support that when searching for content which is either of resource type a directly
or a derived resource type.
>
> I cannot really think of a JCR SQL2 or XPath expression which would also cover derived
resource types (without knowing them in advance).
> Thanks for any pointers,
> Konrad


Mime
View raw message