public interface DocumentViewCodecManager extends Serializable
It handles a set of codecs, used to code/decode a document information between a url and a DocumentView
instance.
Modifier and Type | Method and Description |
---|---|
String |
getDefaultCodecName()
Returns the default codec name.
|
DocumentView |
getDocumentViewFromUrl(String url,
boolean hasBaseUrl,
String baseUrl)
Returns a DocumentView applying for given url, or null.
|
DocumentView |
getDocumentViewFromUrl(String codecName,
String url,
boolean hasBaseUrl,
String baseUrl)
Returns a DocumentView calling
DocumentViewCodec#getDocumentViewFromUrl(String, boolean, String) on codec
with given name. |
String |
getUrlFromDocumentView(DocumentView docView,
boolean needBaseUrl,
String baseUrl)
Returns an URL applying for given document view, or null.
|
String |
getUrlFromDocumentView(String codecName,
DocumentView docView,
boolean needBaseUrl,
String baseUrl)
Returns an URL calling
{@link DocumentViewCodec#getUrlFromDocumentView(DocumentView) on codec
with given name.
|
String getDefaultCodecName()
This information is set on codec descriptors.
DocumentView getDocumentViewFromUrl(String url, boolean hasBaseUrl, String baseUrl)
Iterates over registered codecs, starting from the default codec, and if
DocumentViewCodec.handleUrl(String)
returns true, calls
DocumentViewCodec.getDocumentViewFromUrl(String)
. Stops iterating when a codec returns a non-null value.
url
- the original url from request, including request parameters if any.hasBaseUrl
- boolean indicating if base url should be removed from given url.baseUrl
- value of the base url.DocumentView getDocumentViewFromUrl(String codecName, String url, boolean hasBaseUrl, String baseUrl)
DocumentViewCodec#getDocumentViewFromUrl(String, boolean, String)
on codec
with given name.url
- the original url from request, including request parameters if any.hasBaseUrl
- boolean indicating if base url should be removed from given url.baseUrl
- value of the base url.String getUrlFromDocumentView(DocumentView docView, boolean needBaseUrl, String baseUrl)
Iterates over registered codecs, starting from the default codec, and if
DocumentViewCodec.handleDocumentView(DocumentView)
returns true, calls
DocumentViewCodec.getUrlFromDocumentView(DocumentView)
. Stops iterating when a codec returns a non-null
value. am docView the original document view from request
docView
- the original document view from requesthasBaseUrl
- boolean indicating if base url should be added to the url returned by the codec.baseUrl
- value of the base url.String getUrlFromDocumentView(String codecName, DocumentView docView, boolean needBaseUrl, String baseUrl)
docView
- the original document view from requesthasBaseUrl
- boolean indicating if base url should be added to the
url returned by the codec.baseUrl
- value of the base url.Copyright © 2015 Nuxeo SA. All rights reserved.