Class DefaultRenderingContext
- java.lang.Object
- 
- java.util.AbstractMap<K,V>
- 
- java.util.HashMap<String,Object>
- 
- org.nuxeo.ecm.platform.rendering.impl.DefaultRenderingContext
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,Object>,- RenderingContext,- Adaptable
 - Direct Known Subclasses:
- DocumentRenderingContext
 
 public class DefaultRenderingContext extends HashMap<String,Object> implements RenderingContext 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.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultRenderingContext()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(RenderingEngine engine)Either or not this rendering context accepts the given engine.<T> TgetAdapter(Class<T> adapter)Returns an object which is an instance of the given class associated with this object.- 
Methods inherited from class java.util.HashMapclear, 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.AbstractMapequals, hashCode, toString
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.util.Mapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
 
- 
 
- 
- 
- 
Method Detail- 
getAdapterpublic <T> T getAdapter(Class<T> adapter) Description copied from interface:AdaptableReturns an object which is an instance of the given class associated with this object. Returnsnullif no such object can be found.- Specified by:
- getAdapterin interface- Adaptable
- Parameters:
- adapter- the adapter class to look up
- Returns:
- a object castable to the given class, or nullif this object does not have an adapter for the given class
 
 - 
acceptpublic boolean accept(RenderingEngine engine) Description copied from interface:RenderingContextEither or not this rendering context accepts the given engine.If the engione is not acepted it will be ignored by the rendering service when processing this context - Specified by:
- acceptin interface- RenderingContext
- Parameters:
- engine- the engine to test
- Returns:
- true if the engine is eligible to process this context, false otherwise
 
 
- 
 
-