Class RenditionObject
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultObject
-
- org.nuxeo.ecm.restapi.server.jaxrs.rendition.RenditionObject
-
public class RenditionObject extends DefaultObject
- Since:
- 8.2
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
doc
static String
LEGACY_RENDERING_PROP
protected String
renditionName
protected javax.servlet.http.HttpServletRequest
servletRequest
-
Constructor Summary
Constructors Constructor Description RenditionObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doGet(javax.ws.rs.core.Request request, boolean sync)
Get the rendition blob.<A> A
getAdapter(Class<A> adapter)
Returns an object which is an instance of the given class associated with this object.protected Blob
getLegacyRenditionBlob()
protected Blob
getRenditionBlob()
protected void
initialize(Object... args)
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
LEGACY_RENDERING_PROP
public static final String LEGACY_RENDERING_PROP
- See Also:
- Constant Field Values
-
servletRequest
@Context protected javax.servlet.http.HttpServletRequest servletRequest
-
renditionName
protected String renditionName
-
doc
protected DocumentModel doc
-
-
Method Detail
-
initialize
protected void initialize(Object... args)
- Overrides:
initialize
in classAbstractResource<ResourceTypeImpl>
-
getAdapter
public <A> A getAdapter(Class<A> adapter)
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Overrides:
getAdapter
in classAbstractResource<ResourceTypeImpl>
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
getLegacyRenditionBlob
protected Blob getLegacyRenditionBlob()
-
getRenditionBlob
protected Blob getRenditionBlob()
-
doGet
public Object doGet(@Context javax.ws.rs.core.Request request, boolean sync)
Get the rendition blob.In legacy mode (
nuxeo.rendition.legacy.enabled=true
) all renditions are performed on the front nodes with the risk of overflow when processing lots of large renditions on the fly.In normal mode renditions are processed asynchronously in worker nodes and cached in order to scale, for light renditions that are already preprocessed (like thumbnails) it is possible to use the
sync=true
parameter to force rendition on front node avoiding possible async latency.
-
-