Class DocumentRenderingContext
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.nuxeo.ecm.platform.rendering.impl.DefaultRenderingContext
-
- org.nuxeo.ecm.platform.rendering.impl.DocumentRenderingContext
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
,RenderingContext
,Adaptable
public class DocumentRenderingContext extends DefaultRenderingContext
Abstract RenderingContext subclass that adds capabilities of storing a DocumentModel and retrieve RenderingConfig associated with the current set DocumentModel.- Author:
- Dragos Mihalache
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static String
CTX_PARAM_DOCUMENT
-
Constructor Summary
Constructors Constructor Description DocumentRenderingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.DocumentModel
getDocument()
void
setDocument(DocumentModel doc)
-
Methods inherited from class org.nuxeo.ecm.platform.rendering.impl.DefaultRenderingContext
accept
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
CTX_PARAM_DOCUMENT
public static final String CTX_PARAM_DOCUMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAdapter
public <T> T getAdapter(Class<T> 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 classDefaultRenderingContext
- 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
-
setDocument
public void setDocument(DocumentModel doc)
-
getDocument
public DocumentModel getDocument()
-
-