public class DocumentFileCodec extends AbstractDocumentViewCodec
Modifier and Type | Field and Description |
---|---|
static String |
FILE_PROPERTY_PATH_KEY |
static String |
FILENAME_KEY |
static String |
FILENAME_PROPERTY_PATH_KEY
Deprecated.
soon will be part of the file property, passed as parameter for now
|
static String |
PREFIX |
static String |
URLPattern |
Constructor and Description |
---|
DocumentFileCodec() |
DocumentFileCodec(String prefix) |
Modifier and Type | Method and Description |
---|---|
static Blob |
getBlob(DocumentModel doc,
DocumentView docView) |
static String |
getBlobPropertyName(DocumentView docView) |
static Blob |
getBlobViaBlobHolder(DocumentModel doc,
String bhPath) |
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) |
static String |
getFilenamePropertyName(DocumentView docView) |
String |
getPrefix() |
String |
getUrlFromDocumentView(DocumentView docView)
Builds an url from the given document view.
|
handleDocumentView, handleUrl, setPrefix
public static final String PREFIX
public static final String FILE_PROPERTY_PATH_KEY
@Deprecated public static final String FILENAME_PROPERTY_PATH_KEY
public static final String FILENAME_KEY
public static final String URLPattern
public DocumentFileCodec()
public DocumentFileCodec(String prefix)
public String getPrefix()
getPrefix
in interface DocumentViewCodec
getPrefix
in class AbstractDocumentViewCodec
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 getBlobPropertyName(DocumentView docView)
public static Blob getBlob(DocumentModel doc, DocumentView docView)
public static Blob getBlobViaBlobHolder(DocumentModel doc, String bhPath)
public static String getFilenamePropertyName(DocumentView docView)
public static String getFilename(DocumentModel doc, DocumentView docView)
Copyright © 2015 Nuxeo SA. All rights reserved.