* Computes and returns the URL for the given {@code doc}, using the
* document link builder sets in the
* {@link org.nuxeo.ecm.webengine.model.WebContext}.
*/
public String computeDocumentURL(DocumentModel doc) {
DocumentLocation docLoc = new DocumentLocationImpl(
doc.getRepositoryName(), new IdRef(doc.getId()));
DocumentView docView = new DocumentViewImpl(docLoc, doc.getAdapter(
TypeInfo.class).getDefaultView());
DocumentViewCodecManager documentViewCodecManager = Framework.getLocalService(DocumentViewCodecManager.class);
String documentLinkBuilder = (String) ctx.getProperty("documentLinkBuilder");