{
if (pair.getSecond().getType() == PluggableObjectType.VIEW )
{
// Handle named windows in a configuration that always declares a system-wide virtual view factory
if (optionalNamedWindowName != null && virtualDataWindowViewFactory != null) {
return new VirtualDWViewFactoryImpl(virtualDataWindowViewFactory, optionalNamedWindowName, null);
}
viewFactoryClass = pair.getFirst();
}
else if (pair.getSecond().getType() == PluggableObjectType.VIRTUALDW)
{
if (optionalNamedWindowName == null) {
throw new ViewProcessingException("Virtual data window requires use with a named window in the create-window syntax");
}
return new VirtualDWViewFactoryImpl(pair.getFirst(), optionalNamedWindowName, pair.getSecond().getCustomConfigs());
}
else
{
throw new ViewProcessingException("Invalid object type '" + pair.getSecond() + "' for view '" + name + "'");
}