fr.opensagres.xdocreport.template
Class TemplateContextHelper

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

public class TemplateContextHelper
extends Object

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


Field Summary
static String CONTEXT_KEY
           
static String IMAGE_REGISTRY_KEY
           
static String TEMPLATE_ENGINE_KEY
           
static String TEXT_STYLING_REGISTRY_KEY
           
static 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 String CONTEXT_KEY
See Also:
Constant Field Values

TEMPLATE_ENGINE_KEY

public static final String TEMPLATE_ENGINE_KEY
See Also:
Constant Field Values

TEXT_STYLING_REGISTRY_KEY

public static final String TEXT_STYLING_REGISTRY_KEY
See Also:
Constant Field Values

TRANSFORM_METHOD

public static final String TRANSFORM_METHOD
See Also:
Constant Field Values

IMAGE_REGISTRY_KEY

public static final 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 © 2013. All rights reserved.