Uses of Interface
org.apache.velocity.context.Context
-
-
Uses of Context in org.apache.velocity
Classes in org.apache.velocity that implement Context Modifier and Type Class Description classVelocityContextGeneral purpose implementation of the application Context interface for general application use.Methods in org.apache.velocity with parameters of type Context Modifier and Type Method Description voidTemplate. merge(Context context, Writer writer)The AST node structure is merged with the context to produce the final output.voidTemplate. merge(Context context, Writer writer, List<String> macroLibraries)The AST node structure is merged with the context to produce the final output.Constructors in org.apache.velocity with parameters of type Context Constructor Description VelocityContext(Map<String,Object> context, Context innerContext)Initializes internal storage (never tonull), and inner context.VelocityContext(Context innerContext)Chaining constructor, used when you want to wrap a context in another. -
Uses of Context in org.apache.velocity.app
Methods in org.apache.velocity.app with parameters of type Context Modifier and Type Method Description static booleanVelocity. evaluate(Context context, Writer writer, String logTag, Reader reader)Renders the input reader using the context into the output writer.static booleanVelocity. evaluate(Context context, Writer out, String logTag, String instring)renders the input string using the context into the output writer.booleanVelocityEngine. evaluate(Context context, Writer writer, String logTag, Reader reader)Renders the input reader using the context into the output writer.booleanVelocityEngine. evaluate(Context context, Writer out, String logTag, String instring)renders the input string using the context into the output writer.static booleanVelocity. invokeVelocimacro(String vmName, String logTag, String[] params, Context context, Writer writer)Invokes a currently registered Velocimacro with the params provided and places the rendered stream into the writer.booleanVelocityEngine. invokeVelocimacro(String vmName, String logTag, String[] params, Context context, Writer writer)Invokes a currently registered Velocimacro with the params provided and places the rendered stream into the writer.static booleanVelocity. mergeTemplate(String templateName, String encoding, Context context, Writer writer)Merges a template and puts the rendered stream into the writerbooleanVelocityEngine. mergeTemplate(String templateName, String encoding, Context context, Writer writer)merges a template and puts the rendered stream into the writer -
Uses of Context in org.apache.velocity.app.event
Methods in org.apache.velocity.app.event with parameters of type Context Modifier and Type Method Description booleanEventCartridge. attachToContext(Context context)Attached the EventCartridge to the context Final because not something one should mess with lightly :)StringEventCartridge. includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)Call include event handlersStringIncludeEventHandler. includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)Called when an include-type directive is encountered (#includeor#parse).ObjectEventCartridge. invalidGetMethod(Context context, String reference, Object object, String property, Info info)Call invalid reference handlers for an invalid getterObjectInvalidReferenceEventHandler. invalidGetMethod(Context context, String reference, Object object, String property, Info info)Called when object is null or there is no getter for the given property.ObjectEventCartridge. invalidMethod(Context context, String reference, Object object, String method, Info info)Call invalid reference handlers for an invalid method callObjectInvalidReferenceEventHandler. invalidMethod(Context context, String reference, Object object, String method, Info info)Called when object is null or the given method does not exist.booleanEventCartridge. invalidSetMethod(Context context, String leftreference, String rightreference, Info info)Call invalid reference handlers for an invalid setterbooleanInvalidReferenceEventHandler. invalidSetMethod(Context context, String leftreference, String rightreference, Info info)Called when object is null or there is no setter for the given property.ObjectEventCartridge. methodException(Context context, Class<?> claz, String method, Exception e, Info info)Call method exception event handlerObjectMethodExceptionEventHandler. methodException(Context context, Class<?> claz, String method, Exception e, Info info)Called when a method throws an exception.ObjectReferenceInsertionEventHandler. referenceInsert(Context context, String reference, Object value)A call-back which is executed during Velocity merge before a reference value is inserted into the output stream. -
Uses of Context in org.apache.velocity.app.event.implement
Methods in org.apache.velocity.app.event.implement with parameters of type Context Modifier and Type Method Description StringIncludeNotFound. includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)Check to see if included file exists, and display "not found" page if it doesn't.StringIncludeRelativePath. includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)Return path relative to the current template's path.ObjectReportInvalidReferences. invalidGetMethod(Context context, String reference, Object object, String property, Info info)Collect the error and/or throw an exception, depending on configuration.ObjectReportInvalidReferences. invalidMethod(Context context, String reference, Object object, String method, Info info)Collect the error and/or throw an exception, depending on configuration.booleanReportInvalidReferences. invalidSetMethod(Context context, String leftreference, String rightreference, Info info)Collect the error and/or throw an exception, depending on configuration.ObjectPrintExceptions. methodException(Context context, Class<?> claz, String method, Exception e, Info info)Render the method exception, and optionally the exception message and stack trace.ObjectEscapeReference. referenceInsert(Context context, String reference, Object value)Escape the provided text if it matches the configured regular expression.voidIncludeNotFound. setContext(Context context) -
Uses of Context in org.apache.velocity.context
Subinterfaces of Context in org.apache.velocity.context Modifier and Type Interface Description interfaceInternalContextAdapterinterface to bring all necessary internal and user contexts together.Classes in org.apache.velocity.context that implement Context Modifier and Type Class Description classAbstractContextThis class is the abstract base class for all conventional Velocity Context implementations.classChainedInternalContextAdapterThis is an abstract internal-use-only context implementation to be used as a subclass for other internal-use-only contexts that wrap other internal-use-only contexts.classInternalContextAdapterImplThis adapter class is the container for all context types for internal use.Methods in org.apache.velocity.context that return Context Modifier and Type Method Description ContextAbstractContext. getChainedContext()returns innerContext if one is chainedContextChainedInternalContextAdapter. getInternalUserContext()Return the inner / user context.ContextInternalContextAdapterImpl. getInternalUserContext()returns the user data context that we are wrappingContextInternalWrapperContext. getInternalUserContext()Returns the wrapped user context.Constructors in org.apache.velocity.context with parameters of type Context Constructor Description AbstractContext(Context inner)Chaining constructor accepts a Context argument.InternalContextAdapterImpl(Context c)CTOR takes a Context and wraps it, delegating all 'data' calls to it. -
Uses of Context in org.apache.velocity.example
Classes in org.apache.velocity.example that implement Context Modifier and Type Class Description classDBContextExample context impl that uses a database to store stuff :) yes, this is silly expects a mysql db test with table CREATE TABLE contextstore ( k varchar(100), val blob ); very fragile, crappy code....classTreeMapContextExample context impl that uses a TreeMap Not much point other than to show how easy it is.Methods in org.apache.velocity.example with parameters of type Context Modifier and Type Method Description ObjectEventExample. invalidGetMethod(Context context, String reference, Object object, String property, Info info)ObjectEventExample. invalidMethod(Context context, String reference, Object object, String method, Info info)booleanEventExample. invalidSetMethod(Context context, String leftreference, String rightreference, Info info)Event handler for when the right hand side of a #set() directive is null, which results in a log message.ObjectEventExample. methodException(Context context, Class claz, String method, Exception e, Info info)ObjectEventExample. referenceInsert(Context context, String reference, Object value)Event handler for when a reference is inserted into the output stream.Constructors in org.apache.velocity.example with parameters of type Context Constructor Description DBContext(Context inner)TreeMapContext(Context inner) -
Uses of Context in org.apache.velocity.runtime
Methods in org.apache.velocity.runtime with parameters of type Context Modifier and Type Method Description booleanRuntimeInstance. evaluate(Context context, Writer writer, String logTag, Reader reader)Renders the input reader using the context into the output writer.booleanRuntimeInstance. evaluate(Context context, Writer out, String logTag, String instring)Renders the input string using the context into the output writer.booleanRuntimeServices. evaluate(Context context, Writer writer, String logTag, Reader reader)Renders the input reader using the context into the output writer.booleanRuntimeServices. evaluate(Context context, Writer out, String logTag, String instring)Renders the input string using the context into the output writer.booleanRuntimeInstance. invokeVelocimacro(String vmName, String logTag, String[] params, Context context, Writer writer)Invokes a currently registered Velocimacro with the params provided and places the rendered stream into the writer.booleanRuntimeServices. invokeVelocimacro(String vmName, String logTag, String[] params, Context context, Writer writer)Invokes a currently registered Velocimacro with the params provided and places the rendered stream into the writer.booleanRuntimeInstance. render(Context context, Writer writer, String logTag, SimpleNode nodeTree)Initializes and renders the ASTSimpleNodeusing the context into the output writer. -
Uses of Context in org.apache.velocity.util
Methods in org.apache.velocity.util with parameters of type Context Modifier and Type Method Description voidContextAware. setContext(Context context)Initialize the EventHandler.
-