Class VelocityContextUtil
- java.lang.Object
-
- de.uplanet.lucy.server.scripting.velocity.VelocityContextUtil
-
@Scriptable public final class VelocityContextUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.velocity.VelocityContextcreateDefaultContext(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)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)Creates a new Velocity context and adds default objects to it.
-
-
-
Method Detail
-
createDefaultContext
public static org.apache.velocity.VelocityContext createDefaultContext(IProcessingContext p_ctx)
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(ApplicationContext, IProcessingContext)
-
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(ApplicationContext, IProcessingContext, String)
-
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.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.DEFAULT_LANGUAGEthedefault language,VMVAR.LANGUAGEthecontext language,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).- Returns:
- The new Velocity context.
-
-