public void setSelectionTarget(final Object selectionTarget) { ensureLevelInitialized(-1); this.lastSelectionTarget = new SelectionTarget(selectionTarget); this.selectionTargets[this.index] = this.lastSelectionTarget; }
public void setSelectionTarget(final Object selectionTarget) { ensureLevelInitialized(false); this.lastSelectionTarget = new SelectionTarget(selectionTarget); this.selectionTargets[this.index] = this.lastSelectionTarget; }
static Object resolveLazy(final Object variable) { /* * Check the possibility that this variable is a lazy one, in which case we should not return it directly * but instead make sure it is initialized and return its value. */ if (variable != null && variable instanceof ILazyContextVariable) { return ((ILazyContextVariable)variable).getValue(); } return variable; }
public void removeVariable(final String name) { if (containsVariable(name)) { setVariable(name, NON_EXISTING); } }
public void setInliner(final IInliner inliner) { ensureLevelInitialized(-1); // We use NoOpInliner.INSTANCE in order to signal when inlining has actually been disabled this.lastInliner = (inliner == null? NoOpInliner.INSTANCE : inliner); this.inliners[this.index] = this.lastInliner; }
private void decreaseModelLevel() { this.modelLevel--; this.skipBody = this.skipBodyByLevel[this.modelLevel]; if (this.context != null) { this.context.decreaseLevel(); } }
public void setInliner(final IInliner inliner) { ensureLevelInitialized(false); // We use NoOpInliner.INSTACE in order to signal when inlining has actually been disabled this.lastInliner = (inliner == null? NoOpInliner.INSTANCE : inliner); this.inliners[this.index] = this.lastInliner; }
public Set<String> getVariableNames() { // Note this set will NOT include 'param', 'session' or 'application', as they are considered special // ways to access attributes/parameters in these Servlet API structures return this.requestAttributesVariablesMap.getVariableNames(); }
@Override public String toString() { // Request parameters, session and servlet context can be safely ignored here return this.requestAttributesVariablesMap.toString(); }
public final IdentifierSequences getIdentifierSequences() { // No problem in lazily initializing this here, as context objects should not be used by // multiple threads. if (this.identifierSequences == null) { this.identifierSequences = new IdentifierSequences(); } return this.identifierSequences; }
public String getStringRepresentationByLevel() { // Request parameters, session and servlet context can be safely ignored here return this.requestAttributesVariablesMap.getStringRepresentationByLevel(); }
@Override public boolean contains(final Object obj) { return indexOf(obj) != -1; }
/** * <p> * Returns the <em>template stack</em>, containing the metadata for the first-level template being * processed and also any fragments that might have been nested up to the current execution point. * </p> * <p> * The result of this method actually corresponds to the result of {@link ITemplateContext#getTemplateStack()}. * </p> * * @return the stack of {@link TemplateData} objects */ public List<TemplateData> getTemplateStack() { return this.context.getTemplateStack(); }
public String msgOrNullWithParams(final String messageKey, final Object[] messageParameters) { return this.context.getMessage(null, messageKey, messageParameters, false); }
public Object getSelectionTarget() { return this.requestAttributesVariablesMap.getSelectionTarget(); }
public void setElementTag(final IProcessableElementTag elementTag) { this.requestAttributesVariablesMap.setElementTag(elementTag); }
public List<IProcessableElementTag> getElementStackAbove(final int contextLevel) { return this.requestAttributesVariablesMap.getElementStackAbove(contextLevel); }
public int level() { return this.requestAttributesVariablesMap.level(); }
public void increaseLevel() { this.requestAttributesVariablesMap.increaseLevel(); }
private static Object resolveLazy(final Object variable) { /* * Check the possibility that this variable is a lazy one, in which case we should not return it directly * but instead make sure it is initialized and return its value. */ if (variable != null && variable instanceof ILazyContextVariable) { return ((ILazyContextVariable)variable).getValue(); } return variable; }