Class VelocityContextUtil
java.lang.Object
de.uplanet.lucy.server.scripting.velocity.VelocityContextUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.velocity.VelocityContextCreates a new Velocity context and adds default objects to it.static org.apache.velocity.VelocityContextcreateDefaultContext(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx) Creates a new Velocity context and adds default objects to it.static org.apache.velocity.VelocityContextcreateDefaultContext(org.springframework.context.ApplicationContext p_appCtx, IProcessingContext p_ctx, String p_strLang, String p_strLocale) 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, String p_strLocale) Creates a new Velocity context and adds default objects to it.VMVAR.ASYNCHRONOUSis set tofalse,VMVAR.KERBERIZED,VMVAR.CURRENT_TIMESTAMP,VMVAR.PROCESSING_CONTEXTifp_ctxis notnull,VMVAR.SHARED_STATEif the processing context has a shared state,VMVAR.VELOCITY_CONTEXT,VMVAR.REQUESTif the processing context contains a request,VMVAR.COOKIES,VMVAR.REQUEST_ROUTER,VMVAR.BROWSERif the processing context contains a request with a User-Agent header,VMVAR.SESSIONif the processing context contains a session,VMVAR.USERif the processing context contains a user,VMVAR.DBCONNECTIONif the processing context contains a database connection,VMVAR.ESC,VMVAR.ENCODER,VMVAR.DEFAULT_LANGUAGEthedefault language,VMVAR.LANGUAGEthecontext language,VMVAR.LOCALEthecontext locale,VMVAR.I18N,VMVAR.NULLa variable that contains the valuenullVMVAR.JSONVMVAR.TANVMVAR.OBJHLPVMVAR.FILEUTILVMVAR.SETTINGSHELPERVMVAR.RT_CACHEVMVAR.PORTALVMVAR.DBUTILVMVAR.STOREVMVAR.OBJFACTORYVMVAR.LAYOUTVMVAR.LINK,VMVAR.LOADERVMVAR.BROWSER_CACHE_MANVMVAR.BINDINGVMVAR.SOURCE_PAGEVMVAR.LINKVMVAR.PARAMETERVMVAR.SRC_PAGE_VALUESif 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).p_strLocale- The locale to be used (must not benull).- Returns:
- The new Velocity context.
-