();
/**
* Creates a new {@link ExtensibilityModel} and sets it on the current thread
*/
public ExtensibilityModel openExtensibilityModel()
{
if (logger.isDebugEnabled())
{
logger.debug("Opening for thread: " + Thread.currentThread().getName());
}
this.extendedBundleCache.set(new HashMap());
this.evaluatedModules.set(null);
this.fileBeingProcessed.set(null);
this.globalConfig.set(null);
this.sections.set(null);
this.sectionsByArea.set(null);
ExtensibilityModel model = new ExtensibilityModelImpl(null, this);
this.extensibilityModel.set(model);
this.modelUsed.set(Boolean.FALSE);
return model;
}
/**
* Flushes the {@link ExtensibilityModel} provided and sets its parent as the current {@link ExtensibilityModel}
* for the current thread.
*/
public void closeExtensibilityModel(ExtensibilityModel model, Writer out)
{
if (logger.isDebugEnabled())
{
logger.debug("Closing for thread: " + Thread.currentThread().getName());
}
model.flushModel(out);
this.modelUsed.set(Boolean.FALSE);
this.extensibilityModel.set(null);
}
/**
*
Returns the {@link ExtensibilityModel} for the current thread.
*/
public ExtensibilityModel getCurrentExtensibilityModel()
{
if (logger.isDebugEnabled())
{
logger.debug("Getting current for thread: " + Thread.currentThread().getName());
}
this.modelUsed.set(Boolean.TRUE);
return this.extensibilityModel.get();
}
/**
* This method is implemented to perform no action as it is not necessary for a standalone WebScript
* container to add dependencies for processing.
*/
public void updateExtendingModuleDependencies(String pathBeingProcessed, Map model)
{
// NOT REQUIRED FOR STANDALONE WEBSCRIPT CONTAINER
}
/**
* A thread-safe cache of extended {@link ResourceBundle} instances for the current request.
*/
private ThreadLocal