Leaving some {template} in builder URI with UriBuilder

Jersey UriBuilder can replace all the templates in a URI:

UriBuilder.fromResource(this.getClass()).path("{id}/{op}").build(12, "buy")

On the client side, it is exactly what we want ; On the server side, in some cases, we want to keep some templates unchanged (to inform the client that the URI depends on it, that it will have to fill it with values).

Building a URI without giving all template throws an exception. So, is there another way to leave some template unchanged?

5
задан Martin Matula 16 June 2012 в 09:09
поделиться