Using @TestReference for serverside tests

2015-05-14 Thread Satya Deep Maheshwari
Hi

As per [1], I am trying to use @TestReference annotation to inject a
reference in my test class. While it working as expected, if I specify a
'target' attribute on this annotation as in [2], it does not get applied.
Does the @TestReference support 'target' attribute like the @Reference
annotation does?

Regards
Satya Deep


[1] -
https://sling.apache.org/documentation/development/sling-testing-tools.html
[2] -
http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html#reference


Re: Is there a way to limit the results of a query using the Sling API?

2015-05-14 Thread Alexander Klimetschek
Yet another query api/language?

Cheers,
Alex

> On 13.05.2015, at 06:23, Carsten Ziegeler  wrote:
> 
> I'm currently trying to design a new query API which is not string based
> anymore. It would be much easier to use, safer and in no way require you
> to write complex SQL or Xpath queries
> 
> I'll soon have a draft which I'll post here for discussion
> 
> Carsten
> 
> Am 13.05.15 um 11:55 schrieb Dirk Rudolph:
>> There isn’t a way to do this so far but it would be a nice improvement. 
>> 
>> See https://issues.apache.org/jira/browse/SLING-1873 
>> 
>> 
>> Cheers, Dirk
>> dirk.rudo...@netcentric.biz  | 
>> www.netcentric.biz 
>>> On 13 May 2015, at 11:19, Santiago García Pimentel 
>>>  wrote:
>>> 
>>> Hello,
>>> 
>>> I wanted to use Sling to find some resources using SQL2 (I would prefer not 
>>> to use the JCR api directly). Unfortunately it seems that the use of limit 
>>> in the query is not supported, so it seems that my only option is to create 
>>> a JCR Query and use query.setLimit(int).
>>> 
>>> Is this correct? I would prefer to use only the Sling API to get these 
>>> resources. The ResourceResolver has a findResources() method, but it does 
>>> not accept any limit.
>>> 
>>> Greetings.
>>> -- 
>>> *Santiago García Pimentel* | Software Engineer
>>> Netcentric Ibérica SL
>>> Av. Diagonal 123 -8ª
>>> 08005 Barcelona
>>> España
>>> Skype: santiago.garciapimentel
>>> santiago.pimen...@netcentric.biz | www.netcentric.es
>> 
>> 
> 
> 
> -- 
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org