Class VelocityContextUtil
java.lang.Object
de.uplanet.lucy.server.scripting.velocity.VelocityContextUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.velocity.VelocityContext
Creates a new Velocity context and adds default objects to it.static org.apache.velocity.VelocityContext
createDefaultContext
(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx) Creates a new Velocity context and adds default objects to it.static org.apache.velocity.VelocityContext
createDefaultContext
(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx, String p_strLang) Creates a new Velocity context and adds default objects to it.
-
Method Details
-
createDefaultContext
Creates a new Velocity context and adds default objects to it.- Parameters:
p_ctx
- The current processing context, ornull
.- Returns:
- The new Velocity context.
- See Also:
-
createDefaultContext
public static org.apache.velocity.VelocityContext createDefaultContext(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx) Creates a new Velocity context and adds default objects to it.The language is context language from the processing context.
- Parameters:
p_appCtx
- The application context.p_ctx
- The current processing context, ornull
.- Returns:
- The new Velocity context.
- See Also:
-
createDefaultContext
public static org.apache.velocity.VelocityContext createDefaultContext(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx, String p_strLang) Creates a new Velocity context and adds default objects to it.VMVAR.ASYNCHRONOUS
is set tofalse
,VMVAR.KERBERIZED
,VMVAR.CURRENT_TIMESTAMP
,VMVAR.PROCESSING_CONTEXT
ifp_ctx
is notnull
,VMVAR.SHARED_STATE
if the processing context has a shared state,VMVAR.VELOCITY_CONTEXT
,VMVAR.REQUEST
if the processing context contains a request,VMVAR.COOKIES
,VMVAR.REQUEST_ROUTER
,VMVAR.BROWSER
if the processing context contains a request with a User-Agent header,VMVAR.SESSION
if the processing context contains a session,VMVAR.USER
if the processing context contains a user,VMVAR.DBCONNECTION
if the processing context contains a database connection,VMVAR.ESC
,VMVAR.DEFAULT_LANGUAGE
thedefault language
,VMVAR.LANGUAGE
thecontext language
,VMVAR.I18N
,VMVAR.NULL
a variable that contains the valuenull
VMVAR.JSON
VMVAR.TAN
VMVAR.OBJHLP
VMVAR.FILEUTIL
VMVAR.SETTINGSHELPER
VMVAR.RT_CACHE
VMVAR.PORTAL
VMVAR.DBUTIL
VMVAR.STORE
VMVAR.OBJFACTORY
VMVAR.LAYOUT
VMVAR.LINK
,VMVAR.LOADER
VMVAR.BROWSER_CACHE_MAN
VMVAR.BINDING
VMVAR.SOURCE_PAGE
VMVAR.APP_USER_PROFILE
VMVAR.LINK
VMVAR.PARAMETER
VMVAR.SRC_PAGE_VALUES
if the processing context contains a view,- all callables that are configured in
internal/cfg/callables
.
- Parameters:
p_appCtx
- The application context.p_ctx
- The current processing context, ornull
.p_strLang
- The language to be used (must not benull
).- Returns:
- The new Velocity context.
-