public class RenditionBasedCodec extends AbstractDocumentViewCodec
This class is shared with Template rendering system.
Codec handling a document repository, id, view and additional request parameters. View is used to represent the Rendition name.
This codec supports both path abd id based urls.
Modifier and Type | Field and Description |
---|---|
static String |
ID_URL_PATTERN |
static String |
PATH_URL_PATTERN |
static String |
RENDITION_PARAM_NAME |
static String |
RENDITION_VIEW_ID |
static int |
URL_MAX_LENGTH |
Constructor and Description |
---|
RenditionBasedCodec() |
Modifier and Type | Method and Description |
---|---|
DocumentView |
getDocumentViewFromUrl(String url)
Extracts the document view from given url.
|
static String |
getRenditionUrl(DocumentModel doc,
String renditionName) |
String |
getUrlFromDocumentView(DocumentView docView)
Builds an url from the given document view.
|
getPrefix, handleDocumentView, handleUrl, setPrefix
public static final int URL_MAX_LENGTH
public static final String RENDITION_PARAM_NAME
public static final String RENDITION_VIEW_ID
public static final String PATH_URL_PATTERN
public static final String ID_URL_PATTERN
public static String getRenditionUrl(DocumentModel doc, String renditionName)
public DocumentView getDocumentViewFromUrl(String url)
DocumentViewCodec
The url is partial: it does not hold the context path information (server:port/nuxeo).
url
- the partial url to redirect to.public String getUrlFromDocumentView(DocumentView docView)
DocumentViewCodec
The url should be partial: it should not hold the context path information (server:port/nuxeo).
Copyright © 2015 Nuxeo SA. All rights reserved.