Hi Udara, I believe you can use,
Collection collection = (Collection) registry.get(RESOURCE_PATH); Not sure if it fits your use-case. Regards, Aruna On Tue, Nov 18, 2014 at 7:18 PM, Udara Liyanage <ud...@wso2.com> wrote: > Hi, > > I want to retrieve all the resources under a resource path. > I found below get(string,int,int) retrieve a resource collection under > given path. However length or the number of resources are not known in > advance. > get(path, startIndex, lenght) > > It is possible to use an very large value as length, however it seems as n > hack. > So currently as an alternative I am using following alternative. > > if (resource instanceof Collection) { > Collection collection = (Collection) resource; > String[] resources = collection.getChildren(); > } else { > > } > > My concern is are there any API or more cleaner workaround where I can > accomplish the task. > > -- > > Udara Liyanage > Software Engineer > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > web: http://udaraliyanage.wordpress.com > phone: +94 71 443 6897 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Aruna Sujith Karunarathna* | Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 9040362 | Work: +94 112145345 Email: ar...@wso2.com | Web: www.wso2.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev