fr.opensagres.xdocreport.template
Class TemplateContextHelper

java.lang.Object
  extended by fr.opensagres.xdocreport.template.TemplateContextHelper

public class TemplateContextHelper
extends java.lang.Object

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


Field Summary
static java.lang.String CONTEXT_KEY
           
static java.lang.String IMAGE_REGISTRY_KEY
           
static java.lang.String TEMPLATE_ENGINE_KEY
           
static java.lang.String TEXT_STYLING_REGISTRY_KEY
           
static java.lang.String TRANSFORM_METHOD
           
 
Constructor Summary
TemplateContextHelper()
           
 
Method Summary
static ITemplateEngine getTemplateEngine(IContext context)
          Retrieves the template engine from the given context.
static void putContext(IContext context)
          Register the given context in the given context.
static void putTemplateEngine(IContext context, ITemplateEngine templateEngine)
          Register the given template engine in the given context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_KEY

public static final java.lang.String CONTEXT_KEY
See Also:
Constant Field Values

TEMPLATE_ENGINE_KEY

public static final java.lang.String TEMPLATE_ENGINE_KEY
See Also:
Constant Field Values

TEXT_STYLING_REGISTRY_KEY

public static final java.lang.String TEXT_STYLING_REGISTRY_KEY
See Also:
Constant Field Values

TRANSFORM_METHOD

public static final java.lang.String TRANSFORM_METHOD
See Also:
Constant Field Values

IMAGE_REGISTRY_KEY

public static final java.lang.String IMAGE_REGISTRY_KEY
See Also:
Constant Field Values
Constructor Detail

TemplateContextHelper

public TemplateContextHelper()
Method Detail

putContext

public static void putContext(IContext context)
Register the given context in the given context. With that it's possible to retrieves the context in template engine directive.

Parameters:
context -

putTemplateEngine

public static void putTemplateEngine(IContext context,
                                     ITemplateEngine templateEngine)
Register the given template engine in the given context.

Parameters:
context -
templateEngine -

getTemplateEngine

public static ITemplateEngine getTemplateEngine(IContext context)
Retrieves the template engine from the given context.

Parameters:
context -
Returns:


Copyright © 2012. All Rights Reserved.