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  | 
protected static org.apache.commons.logging.Log | 
log  | 
static String | 
PATH_URL_PATTERN  | 
static String | 
RENDITION_PARAM_NAME  | 
static String | 
RENDITION_VIEW_ID  | 
static int | 
URL_MAX_LENGTH  | 
prefix| 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. 
 | 
protected String | 
getUrlFromDocumentViewWithId(DocumentView docView)  | 
getPrefix, handleDocumentView, handleUrl, setPrefixprotected static final org.apache.commons.logging.Log log
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 RenditionBasedCodec()
public static String getRenditionUrl(DocumentModel doc, String renditionName)
public DocumentView getDocumentViewFromUrl(String url)
DocumentViewCodecThe url is partial: it does not hold the context path information (server:port/nuxeo).
url - the partial url to redirect to.protected String getUrlFromDocumentViewWithId(DocumentView docView)
public String getUrlFromDocumentView(DocumentView docView)
DocumentViewCodecThe url should be partial: it should not hold the context path information (server:port/nuxeo).
Copyright © 2019 Nuxeo. All rights reserved.