public void configure(Container container)
{
AccessControl accessControl = container.getBean(AccessControl.class);
AjaxFilterManager ajaxFilterManager = container.getBean(AjaxFilterManager.class);
ConverterManager converterManager = container.getBean(ConverterManager.class);
CreatorManager creatorManager = container.getBean(CreatorManager.class);
// Configure the global filters
if (null != filters)
{
for (AjaxFilter filter : filters)
{
ajaxFilterManager.addAjaxFilter(filter);
}
}
// Configure the creator types
if (creatorTypes != null)
{
for (Entry<String, String> entry : creatorTypes.entrySet())
{
String typeName = entry.getKey();
String className = entry.getValue();
creatorManager.addCreatorType(typeName, className);
}
}
// Configure the converter types
if (converterTypes != null)
{
for (Entry<String, String> entry : converterTypes.entrySet())
{
String typeName = entry.getKey();
String className = entry.getValue();
converterManager.addConverterType(typeName, className);
}
}
// Configure the creators
if (creators != null)
{
try
{
for (Entry<String, CreatorConfig> entry : creators.entrySet())
{
String scriptName = entry.getKey();
CreatorConfig creatorConfig = entry.getValue();
if (creatorConfig.getCreator() != null)
{
Creator creator = creatorConfig.getCreator();
creatorManager.addCreator(creator);
}
else
{
String creatorName = creatorConfig.getCreatorType();
Map<String, String> params = creatorConfig.getParams();
creatorManager.addCreator(creatorName, params);
}
for (String exclude : creatorConfig.getExcludes())
{
accessControl.addExcludeRule(scriptName, exclude);