Class VelocityContextUtil

java.lang.Object
de.uplanet.lucy.server.scripting.velocity.VelocityContextUtil

@Scriptable public final class VelocityContextUtil extends Object
  • Method Details

    • 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, or null.
      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, or null.
      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 to false,
      • VMVAR.KERBERIZED,
      • VMVAR.CURRENT_TIMESTAMP,
      • VMVAR.PROCESSING_CONTEXT if p_ctx is not null,
      • 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 the default language,
      • VMVAR.LANGUAGE the context language,
      • VMVAR.I18N,
      • VMVAR.NULL a variable that contains the value null
      • 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, or null.
      p_strLang - The language to be used (must not be null).
      Returns:
      The new Velocity context.