String defaultNamespace = XMLConstants.NULL_NS_URI;
List<ContainerListenerInfo> listeners = Collections.emptyList();
Map<String, ContainerFilterInfo> allFilters = new HashMap<String, ContainerFilterInfo>();
if (this.portletApplicationMD instanceof PortletApplication20MetaData)
{
PortletApplication20MetaData tmp = (PortletApplication20MetaData)this.portletApplicationMD;
//
defaultNamespace = tmp.getDefaultNamespace() != null ? tmp.getDefaultNamespace().toString() : null;
//
for (EventDefinitionMetaData eventDefinitionMD : tmp.getEvents())
{
try
{
ContainerEventInfo event = build(eventDefinitionMD);
events.put(event.getName(), event);
}
catch (NoSuchClassException e)
{
log.error("Cannot load event class " + e.getClassName(), e);
}
}
//
for (PublicRenderParameterMetaData parameterMD : tmp.getPublicRenderParameters())
{
ContainerParameterInfo parameter = build(parameterMD);
//
publicParameters.put(parameter.getId(), parameter);
}
//
Map<String, ContainerOptionInfo> applicationOptions = build(tmp.getContainerRuntimeOptions().values());
if (applicationOptions != null)
{
this.applicationOptions.putAll(applicationOptions);
}
//
listeners = new ArrayList<ContainerListenerInfo>(tmp.getListeners().size());
for (ListenerMetaData listenerMD : tmp.getListeners())
{
ContainerListenerInfo listener = build(listenerMD);
listeners.add(listener);
}
listeners = Collections.unmodifiableList(listeners);
//
for (FilterMetaData filterMD : tmp.getFilterCollection())
{
ContainerFilterInfo filter = build(filterMD);
allFilters.put(filter.getName(), filter);
}
}