Package org.nuxeo.ecm.platform.url.codec
Class DocumentIdCodec
- java.lang.Object
-
- org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
-
- org.nuxeo.ecm.platform.url.codec.DocumentIdCodec
-
- All Implemented Interfaces:
DocumentViewCodec
public class DocumentIdCodec extends AbstractDocumentViewCodec
Codec handling a document repository, id, view and additional request parameters.- Author:
- Anahide Tchertchian
-
-
Field Summary
Fields Modifier and Type Field Description static String
PREFIX
static String
URLPattern
-
Fields inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
prefix
-
-
Constructor Summary
Constructors Constructor Description DocumentIdCodec()
DocumentIdCodec(String prefix)
-
Method Summary
All 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 .String
getPrefix()
String
getUrlFromDocumentView(DocumentView docView)
Builds an url from the given document view.-
Methods inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
handleDocumentView, handleUrl, setPrefix
-
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
URLPattern
public static final String URLPattern
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentIdCodec
public DocumentIdCodec()
-
DocumentIdCodec
public DocumentIdCodec(String prefix)
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interfaceDocumentViewCodec
- Overrides:
getPrefix
in classAbstractDocumentViewCodec
-
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.
-
-