Resource resource = registryService.get(resourcePath); return resource.getContent();
Above will return the resource if there is a end resource on the path "resourcePath" or else an array of String which consist the resource paths of the resources that lies inside the "resourcePath" path. This way you can traverse the entire resource list recursively. Feel painfull :-) Sorry if this is not what you required. On Sun, Dec 8, 2013 at 8:16 AM, Chanaka Fernando <chana...@wso2.com> wrote: > In that case you can first look for the registry entry ( key) you are > going to add in the existing registry with the help of the above mentioned > code block. Then if it is not there, you can add that entry. Bottom line of > what you are trying to achieve is some kind of search. This can be achieved > through the existing api s as I mentioned above. > On Dec 8, 2013 7:07 AM, "Aliosha" <aliosh...@gmail.com> wrote: > >> Well... in my application i aim to add and remove dynamically >> address-endpoints to LoadBalanced Enpoints according to some >> conditions (each L-B-Endpoint is saved in /_system/config in the way i can >> keep their persistence).As i have more than one LoadBalance endpoint, >> before adding o removing, i need to check the presence of the >> address-endpoint in one of the loadbalance endpoint. I'm doing this >> programmatically and i have not knowledge about which (key-name) and how >> many Load-balanced-endpoint are there. I want to avoid to keep somewhere a >> static list of the l-b-endpoints as i need to achieve a sufficient >> flexibility. So i need to have the possibility to explore the registry >> content. >> >> >> 2013/12/8 Chanaka Fernando <chana...@wso2.com> >> >>> Hi Aliosha, >>> >>> As per the current implementation, it doesn't have an API to access the >>> entire registry entries list. What are you trying to achieve through >>> getting the entire list? >>> >>> Thanks, >>> Chanaka >>> >>> >>> On Fri, Dec 6, 2013 at 11:55 AM, Aliosha <aliosh...@gmail.com> wrote: >>> >>>> Hi i need some help in this trick: >>>> For many reason i'm saving some endpoints in my /_system/config >>>> registry. >>>> >>>> In my code i need to get the list of all of them. >>>> I know i can get one resource programmatically using the code in the >>>> link below and previoulsy knowing its key: >>>> http://vvratha.blogspot.it/2013_02_01_archive.html >>>> >>>> In particular i'm referring to: >>>> >>>> Registry regInstance = synapseMsgContext.getConfiguration() >>>> .getRegistry(); >>>> >>>> Object obj = regInstance.getResource(new Entry ("Key"), null); >>>> >>>> >>>> How can i get all the /_system/config entries List? >>>> Really thanks. >>>> >>> >>> >>> >>> -- >>> -- >>> Chanaka Fernando >>> Technical Lead >>> WSO2, Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> mobile: +94 773337238 >>> Blog : http://soatutorials.blogspot.com >>> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 >>> Twitter:https://twitter.com/chanakaudaya >>> Wordpress:http://chanakaudaya.wordpress.com >>> >>> >>> >>> >> > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- 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