Package org.nuxeo.ecm.platform.url.api

Examples of org.nuxeo.ecm.platform.url.api.DocumentViewCodecManager


    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");
        String codecName = isBlank(documentLinkBuilder) ? documentViewCodecManager.getDefaultCodecName()
                : documentLinkBuilder;
        String baseURL = VirtualHostHelper.getBaseURL(ctx.getRequest());
        return documentViewCodecManager.getUrlFromDocumentView(codecName,
                docView, true, baseURL);
    }
View Full Code Here

TOP

Related Classes of org.nuxeo.ecm.platform.url.api.DocumentViewCodecManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.