org.springframework.extensions.webscripts
Class ProcessorModelHelper

java.lang.Object
  extended by org.springframework.extensions.webscripts.ProcessorModelHelper

public final class ProcessorModelHelper
extends Object

Helper to generate the model map for Script and Template execution.

The model consists of a number of context driven objects such as current page and current template and a number of common helper objects such as the URL and current user.

Author:
muzquiano, kevinr

Field Summary
static String MODEL_APP
           
static String MODEL_CONFIG
           
static String MODEL_CONTENT
           
static String MODEL_CONTEXT
           
static String MODEL_DESCRIPTION
           
static String MODEL_DESCRIPTION_ID
           
static String MODEL_FORM_INSTANCE
           
static String MODEL_FORMDATA
           
static String MODEL_HEAD
           
static String MODEL_ID
           
static String MODEL_INSTANCE
           
static String MODEL_LOCALE
           
static String MODEL_MESSAGE_METHOD
           
static String MODEL_PAGE
           
static String MODEL_PROPERTIES
           
static String MODEL_SITEDATA
           
static String MODEL_TEMPLATE
           
static String MODEL_THEME
           
static String MODEL_TITLE
           
static String MODEL_TITLE_ID
           
static String MODEL_URL
           
static String MODEL_USER
           
static String PROP_HTMLID
           
 
Constructor Summary
ProcessorModelHelper()
           
 
Method Summary
static void populateScriptModel(RenderContext context, Map<String,Object> model)
          Populate the model for script processor.
static void populateTemplateModel(RenderContext context, Map<String,Object> model)
          Populate the model for template processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_CONFIG

public static final String MODEL_CONFIG
See Also:
Constant Field Values

MODEL_HEAD

public static final String MODEL_HEAD
See Also:
Constant Field Values

MODEL_URL

public static final String MODEL_URL
See Also:
Constant Field Values

MODEL_USER

public static final String MODEL_USER
See Also:
Constant Field Values

MODEL_INSTANCE

public static final String MODEL_INSTANCE
See Also:
Constant Field Values

MODEL_CONTENT

public static final String MODEL_CONTENT
See Also:
Constant Field Values

MODEL_CONTEXT

public static final String MODEL_CONTEXT
See Also:
Constant Field Values

MODEL_SITEDATA

public static final String MODEL_SITEDATA
See Also:
Constant Field Values

MODEL_LOCALE

public static final String MODEL_LOCALE
See Also:
Constant Field Values

MODEL_TEMPLATE

public static final String MODEL_TEMPLATE
See Also:
Constant Field Values

MODEL_PAGE

public static final String MODEL_PAGE
See Also:
Constant Field Values

MODEL_PROPERTIES

public static final String MODEL_PROPERTIES
See Also:
Constant Field Values

MODEL_THEME

public static final String MODEL_THEME
See Also:
Constant Field Values

MODEL_DESCRIPTION

public static final String MODEL_DESCRIPTION
See Also:
Constant Field Values

MODEL_DESCRIPTION_ID

public static final String MODEL_DESCRIPTION_ID
See Also:
Constant Field Values

MODEL_TITLE

public static final String MODEL_TITLE
See Also:
Constant Field Values

MODEL_TITLE_ID

public static final String MODEL_TITLE_ID
See Also:
Constant Field Values

MODEL_ID

public static final String MODEL_ID
See Also:
Constant Field Values

MODEL_FORM_INSTANCE

public static final String MODEL_FORM_INSTANCE
See Also:
Constant Field Values

MODEL_FORMDATA

public static final String MODEL_FORMDATA
See Also:
Constant Field Values

MODEL_APP

public static final String MODEL_APP
See Also:
Constant Field Values

PROP_HTMLID

public static final String PROP_HTMLID
See Also:
Constant Field Values

MODEL_MESSAGE_METHOD

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

ProcessorModelHelper

public ProcessorModelHelper()
Method Detail

populateScriptModel

public static void populateScriptModel(RenderContext context,
                                       Map<String,Object> model)
Populate the model for script processor.

Parameters:
context - render context
model - to populate

populateTemplateModel

public static void populateTemplateModel(RenderContext context,
                                         Map<String,Object> model)
                                  throws RendererExecutionException,
                                         UnsupportedEncodingException
Populate the model for template processor.

Parameters:
context - render context
model - to populate
Throws:
RendererExecutionException
UnsupportedEncodingException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.