Package org.nuxeo.ecm.platform.url.codec
Class DocumentFileCodec
- java.lang.Object
-
- org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
-
- org.nuxeo.ecm.platform.url.codec.DocumentFileCodec
-
- All Implemented Interfaces:
DocumentViewCodec
public class DocumentFileCodec extends AbstractDocumentViewCodec
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_PROPERTY_PATH_KEY
static String
FILENAME_KEY
static String
URLPattern
-
Fields inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
prefix
-
-
Constructor Summary
Constructors Constructor Description DocumentFileCodec()
DocumentFileCodec(String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
getPrefix, handleDocumentView, handleUrl, setPrefix
-
-
-
-
Field Detail
-
FILE_PROPERTY_PATH_KEY
public static final String FILE_PROPERTY_PATH_KEY
- See Also:
- Constant Field Values
-
FILENAME_KEY
public static final String FILENAME_KEY
- See Also:
- Constant Field Values
-
URLPattern
public static final String URLPattern
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentFileCodec
public DocumentFileCodec()
-
DocumentFileCodec
public DocumentFileCodec(String prefix)
-
-
Method Detail
-
getUrlFromDocumentView
public String getUrlFromDocumentView(DocumentView docView)
Description copied from interface:DocumentViewCodec
Builds an url from the given document view.The url should be partial: it should not hold the context path information (server:port/nuxeo).
-
getDocumentViewFromUrl
public DocumentView getDocumentViewFromUrl(String url)
Extracts document location from a Zope-like URL ie : server/path_or_docId/view_id/tab_id .- Parameters:
url
- the partial url to redirect to.- Returns:
- a document view instance.
-
getFilename
public static String getFilename(DocumentModel doc, DocumentView docView)
-
-