Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.rendering.impl
Class DefaultRenderingContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by 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.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
DefaultRenderingContext()
           
 
Method Summary
 boolean accept(RenderingEngine engine)
          Either or not this rendering context accepts the given engine.
<T> T
getAdapter(Class<T> adapter)
          Returns an object which is an instance of the given class associated with this object.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultRenderingContext

public DefaultRenderingContext()
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. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
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

accept

public boolean accept(RenderingEngine engine)
Description copied from interface: RenderingContext
Either 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:
accept in interface RenderingContext
Parameters:
engine - the engine to test
Returns:
true if the engine is eligible to process this context, false otherwise

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.