|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.DefaultComponent org.nuxeo.ecm.platform.url.service.DocumentViewCodecService
public class DocumentViewCodecService
Field Summary | |
---|---|
static String |
CODECS_EXTENSION_POINT
|
static String |
NAME
|
Constructor Summary | |
---|---|
DocumentViewCodecService()
|
Method Summary | ||
---|---|---|
void |
deactivate(ComponentContext context)
Deactivates the component. |
|
|
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object. |
|
DocumentViewCodec |
getCodec()
|
|
DocumentViewCodec |
getCodec(String codecName)
|
|
String |
getDefaultCodecName()
Returns the default codec name. |
|
List<String> |
getDocumentViewCodecDescriptorNames()
|
|
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. |
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor)
|
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor)
|
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
activate, applicationStarted, registerExtension, unregisterExtension |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAME
public static final String CODECS_EXTENSION_POINT
Constructor Detail |
---|
public DocumentViewCodecService()
Method Detail |
---|
public void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic <T> T getAdapter(Class<T> adapter)
Adaptable
null
if
no such object can be found.
getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given classpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public List<String> getDocumentViewCodecDescriptorNames()
public String getDefaultCodecName()
DocumentViewCodecManager
This information is set on codec descriptors.
getDefaultCodecName
in interface DocumentViewCodecManager
public DocumentViewCodec getCodec()
public DocumentViewCodec getCodec(String codecName)
public String getUrlFromDocumentView(DocumentView docView, boolean needBaseUrl, String baseUrl)
DocumentViewCodecManager
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
getUrlFromDocumentView
in interface DocumentViewCodecManager
docView
- the original document view from requestbaseUrl
- value of the base url.public String getUrlFromDocumentView(String codecName, DocumentView docView, boolean needBaseUrl, String baseUrl)
DocumentViewCodecManager
getUrlFromDocumentView
in interface DocumentViewCodecManager
docView
- the original document view from requestbaseUrl
- value of the base url.public DocumentView getDocumentViewFromUrl(String url, boolean hasBaseUrl, String baseUrl)
DocumentViewCodecManager
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.
getDocumentViewFromUrl
in interface DocumentViewCodecManager
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.public DocumentView getDocumentViewFromUrl(String codecName, String url, boolean hasBaseUrl, String baseUrl)
DocumentViewCodecManager
DocumentViewCodec#getDocumentViewFromUrl(String, boolean, String)
on codec with given name.
getDocumentViewFromUrl
in interface DocumentViewCodecManager
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.
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |