public DialectAwareProcessingContext( final IProcessingContext processingContext, final Collection<? extends IDialect> dialects) { super((processingContext == null? null : processingContext.getContext()), (processingContext == null? null : processingContext.getLocalVariables()), (processingContext == null? null : processingContext.getSelectionTarget()), (processingContext != null && processingContext.hasSelectionTarget()), dialects); Validate.notNull(processingContext, "Processing context cannot be null"); }
final Map<String,Object> contextVariables = processingContext.getExpressionObjects(); processingContext.getExpressionSelectionEvaluationRoot() : processingContext.getExpressionEvaluationRoot());
final IContext context = processingContext.getContext(); final Object evaluationRoot = processingContext.getExpressionEvaluationRoot(); variables.put(VARIABLES_EVALUATION_VARIABLE_NAME, evaluationRoot); if (processingContext.hasSelectionTarget()) { variables.put(SELECTION_VARIABLE_NAME, processingContext.getSelectionTarget()); } else { variables.put(SELECTION_VARIABLE_NAME, evaluationRoot);
(templateProcessingParameters == null? null : templateProcessingParameters.getProcessingContext().getLocalVariables()), (templateProcessingParameters == null? null : templateProcessingParameters.getProcessingContext().getSelectionTarget()), (templateProcessingParameters != null && templateProcessingParameters.getProcessingContext().hasSelectionTarget()), (templateProcessingParameters == null? null : templateProcessingParameters.getConfiguration().getDialectSet()));
/** * <p> * Returns the current context specified for template processing. * </p> * <p> * Equivalent to <tt>getProcessingContext().getContext()</tt>. * </p> * * @return the current context */ public IContext getContext() { return this.processingContext.getContext(); }
new LocalVariablesHttpServletRequest(request, processingContext.getLocalVariables());
ctxt.putAll(processingContext.getExpressionObjects()); processingContext.getExpressionSelectionEvaluationRoot() : processingContext.getExpressionEvaluationRoot());
protected Map<String, Object> computeAdditionalContextVariables(IProcessingContext processingContext) { Map<String, Object> var = new HashMap<>(); var.put(Routes.OBJECT_NAME, processingContext.getContext().getVariables().get(Routes.ROUTES_VAR)); final Context context = Context.CONTEXT.get(); if (context != null) { var.put("http", context); var.put("session", context.session()); var.put("flash", context.flash()); var.put("request", context.request()); var.put("parameters", context.parameters()); } return var; }
new LocalVariablesHttpServletRequest(request, processingContext.getLocalVariables());
public ProcessingContext(final IProcessingContext processingContext) { super((processingContext == null? null : processingContext.getContext()), (processingContext == null? null : processingContext.getLocalVariables()), (processingContext == null? null : processingContext.getSelectionTarget()), (processingContext != null && processingContext.hasSelectionTarget())); Validate.notNull(processingContext, "Processing context cannot be null"); }
if (!isWebContext(processingContext.getContext()) && !isLinkBaseAbsolute(linkBase) && !isLinkBaseServerRelative(linkBase)) { throw new TemplateProcessingException( "Link base \"" + linkBase + "\" cannot be context relative (/) or page relative unless you implement the " + IWebContext.class.getName() + " interface (context is of class: " + processingContext.getContext().getClass().getName() + ")"); if (!isWebContext(processingContext.getContext())) { final IWebContext webContext = (IWebContext) processingContext.getContext();
Validate.notNull(processingContext, "Processing context cannot be null"); final IContext context = processingContext.getContext();