fr.opensagres.xdocreport.document
Class DocumentContextHelper

java.lang.Object
  extended by fr.opensagres.xdocreport.document.DocumentContextHelper

public class DocumentContextHelper
extends Object

Helper to register and retrieves default Java model for the IContext.


Field Summary
static String ELEMENTS_KEY
           
 
Constructor Summary
DocumentContextHelper()
           
 
Method Summary
static BufferedElement getElementById(IContext context, String elementId)
          Returns the BufferedElement from the given context with the given element id.
static Map<String,BufferedElement> getElementsCache(IContext context)
          Retrieves the elements cache from the given context.
static IImageHandler getImageHandler(IContext context)
           
static IImageRegistry getImageRegistry(IContext context)
           
static void putElementsCache(IContext context, Map<String,BufferedElement> elementsCache)
          Register the given elements cache in the given context.
static void putImageHandler(IContext context, IImageHandler imageHandler)
           
static void putImageRegistry(IContext context, IImageRegistry imageRegistry)
           
static void putTextStylingRegistry(IContext context, TextStylingRegistry registry)
          Register the given text styling registry in the given context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENTS_KEY

public static final String ELEMENTS_KEY
See Also:
Constant Field Values
Constructor Detail

DocumentContextHelper

public DocumentContextHelper()
Method Detail

putElementsCache

public static void putElementsCache(IContext context,
                                    Map<String,BufferedElement> elementsCache)
Register the given elements cache in the given context.

Parameters:
context -
templateEngine -

getElementsCache

public static Map<String,BufferedElement> getElementsCache(IContext context)
Retrieves the elements cache from the given context.

Parameters:
context -
Returns:

getElementById

public static BufferedElement getElementById(IContext context,
                                             String elementId)
Returns the BufferedElement from the given context with the given element id.

Parameters:
context -
elementId -
Returns:

putTextStylingRegistry

public static void putTextStylingRegistry(IContext context,
                                          TextStylingRegistry registry)
Register the given text styling registry in the given context.

Parameters:
context -
registry -

putImageRegistry

public static void putImageRegistry(IContext context,
                                    IImageRegistry imageRegistry)

getImageRegistry

public static IImageRegistry getImageRegistry(IContext context)

putImageHandler

public static void putImageHandler(IContext context,
                                   IImageHandler imageHandler)

getImageHandler

public static IImageHandler getImageHandler(IContext context)


Copyright © 2013. All rights reserved.