Class DocumentContextHelper
java.lang.Object
fr.opensagres.xdocreport.document.DocumentContextHelper
Helper to register and retrieves default Java model for the
IContext.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedElementgetElementById(fr.opensagres.xdocreport.template.IContext context, String elementId) Returns theBufferedElementfrom the given context with the given element id.static Map<String,BufferedElement> getElementsCache(fr.opensagres.xdocreport.template.IContext context) Retrieves the elements cache from the given context.static IImageHandlergetImageHandler(fr.opensagres.xdocreport.template.IContext context) static IImageRegistrygetImageRegistry(fr.opensagres.xdocreport.template.IContext context) static voidputElementsCache(fr.opensagres.xdocreport.template.IContext context, Map<String, BufferedElement> elementsCache) Register the given elements cache in the given context.static voidputImageHandler(fr.opensagres.xdocreport.template.IContext context, IImageHandler imageHandler) static voidputImageRegistry(fr.opensagres.xdocreport.template.IContext context, IImageRegistry imageRegistry) static voidputTextStylingRegistry(fr.opensagres.xdocreport.template.IContext context, TextStylingRegistry registry) Register the given text styling registry in the given context.
-
Field Details
-
ELEMENTS_KEY
- See Also:
-
-
Constructor Details
-
DocumentContextHelper
public DocumentContextHelper()
-
-
Method Details
-
putElementsCache
public static void putElementsCache(fr.opensagres.xdocreport.template.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(fr.opensagres.xdocreport.template.IContext context) Retrieves the elements cache from the given context.- Parameters:
context-- Returns:
-
getElementById
public static BufferedElement getElementById(fr.opensagres.xdocreport.template.IContext context, String elementId) Returns theBufferedElementfrom the given context with the given element id.- Parameters:
context-elementId-- Returns:
-
putTextStylingRegistry
public static void putTextStylingRegistry(fr.opensagres.xdocreport.template.IContext context, TextStylingRegistry registry) Register the given text styling registry in the given context.- Parameters:
context-registry-
-
putImageRegistry
public static void putImageRegistry(fr.opensagres.xdocreport.template.IContext context, IImageRegistry imageRegistry) -
getImageRegistry
-
putImageHandler
public static void putImageHandler(fr.opensagres.xdocreport.template.IContext context, IImageHandler imageHandler) -
getImageHandler
-