I'm trying to migrate my app to the new codebase but am having problems in the area of URI resolution still. I have a few questions...

1. Looking at CustomProvider, it seems the TargetBuilder completely specifies the URI space. We should be able to deduce all of the stuff the RegexTargetResolver does in that case from the TargetBuilder. So it seems to be that at the very least TemplateTargetBuilder should implement Resolver<Target>.

2. Is a TargetBuilder always going to be required now (for the RequestContext.urlFor methods)?

3. Given this expression:

setTemplate(TargetType.TYPE_COLLECTION, "{target_base}/{collection}{-opt|?|q,c,s,p,l,i,o}{-join|&|q,c,s,p,l,i,o}");

And a "target_base" of "/api", I get out URIs like: "%2Fapi/registry". I'm simply using this method in SimpleAdapter inside AbstactCollectionAdaptor:

 public String getHref(RequestContext request) {
   Map<String,Object> params = new HashMap<String,Object>();
   params.put("collection", href);
   return request.urlFor(TargetType.TYPE_COLLECTION, params);
 }

This behavior doesn't seem right to me. Any ideas on the escaping?

4. In SimpleAdapter - getHref and getFeedBaseUri should return the same thing right? They're just two different ways of doing so?

Thanks,
- Dan

--
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog

Reply via email to