On Tue, Jul 16, 2013 at 1:19 PM, Bertrand Delacretaz <[email protected]
> wrote:

> Hi,
>
> On Tue, Jul 16, 2013 at 9:34 AM, Dishara Wijewardana
> <[email protected]> wrote:
> > ....I was got stuck where to find the resolver (according to  my
> > understanding). To set the resolver through reflection, I need to get a
> > real resolver reference instance....
>
> Where exactly do you have that problem?
>
> If you can give us the URL of that problematic code, it would be much
> easier for us to suggest solutions.
>

This is a simple Junit test class[1]. And I cannot figure out what needs to
be done to obtain a existing resource resolver reference due to above
mentioned complicatoins.
 And there currently I am using a dummy resolver implementation to pass to
the provider to obtain a resource.  As Ian mentioned we should pass an
existing reference of a resolver. Here is the code that does this.

   private void readData(CassandraResourceProvider
cassandraResourceProvider, String cf) {
        Resource resource = cassandraResourceProvider.getResource(new
CassandraResourceResolver(), "/content/cassandra/" + cf + "/foo/bar");

    }


[1] -
https://cassandra-backend-for-sling.googlecode.com/svn/trunk/main/cassandra/src/test/java/org/apache/sling/cassandra/test/data/populator/CassandraDataPopulatorTest.java


> -Bertrand
>



-- 
Thanks
/Dishara

Reply via email to