public class DocumentFileCodec extends AbstractDocumentViewCodec
Modifier and Type | Field and Description |
---|---|
static String |
FILE_PROPERTY_PATH_KEY |
static String |
FILENAME_KEY |
static String |
URLPattern |
prefix
Constructor and Description |
---|
DocumentFileCodec() |
DocumentFileCodec(String prefix) |
Modifier and Type | Method and Description |
---|---|
DocumentView |
getDocumentViewFromUrl(String url)
Extracts document location from a Zope-like URL ie : server/path_or_docId/view_id/tab_id .
|
static String |
getFilename(DocumentModel doc,
DocumentView docView) |
String |
getUrlFromDocumentView(DocumentView docView)
Builds an url from the given document view.
|
getPrefix, handleDocumentView, handleUrl, setPrefix
public static final String FILE_PROPERTY_PATH_KEY
public static final String FILENAME_KEY
public static final String URLPattern
public DocumentFileCodec()
public DocumentFileCodec(String prefix)
public String getUrlFromDocumentView(DocumentView docView)
DocumentViewCodec
The url should be partial: it should not hold the context path information (server:port/nuxeo).
public DocumentView getDocumentViewFromUrl(String url)
url
- the partial url to redirect to.public static String getFilename(DocumentModel doc, DocumentView docView)
Copyright © 2018 Nuxeo. All rights reserved.